alf-core 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (686) hide show
  1. data/CHANGELOG.md +12 -1
  2. data/Gemfile +1 -1
  3. data/lib/alf-core.rb +1 -39
  4. data/lib/alf/algebra/operator/hierarchize.rb +1 -1
  5. data/lib/alf/algebra/operator/unwrap.rb +5 -2
  6. data/lib/alf/algebra/shortcut.rb +1 -0
  7. data/lib/alf/algebra/shortcut/image.rb +33 -0
  8. data/lib/alf/compiler.rb +1 -1
  9. data/lib/alf/compiler/cog.rb +8 -1
  10. data/lib/alf/core.rb +39 -0
  11. data/lib/alf/core/version.rb +1 -1
  12. data/lib/alf/database/connection.rb +1 -1
  13. data/lib/alf/engine/group/hash.rb +1 -1
  14. data/lib/alf/engine/leaf.rb +4 -2
  15. data/lib/alf/engine/ungroup.rb +4 -1
  16. data/lib/alf/ext.rb +1 -0
  17. data/lib/alf/ext/domain/heading_based.rb +6 -0
  18. data/lib/alf/ext/yaml.rb +35 -0
  19. data/lib/alf/facade.rb +4 -2
  20. data/lib/alf/reader/rash.rb +5 -0
  21. data/lib/alf/relation.rb +6 -5
  22. data/lib/alf/relvar.rb +1 -3
  23. data/lib/alf/relvar/read_only.rb +1 -1
  24. data/lib/alf/renderer/text.rb +1 -2
  25. data/lib/alf/renderer/yaml.rb +7 -0
  26. data/lib/alf/support/miscellaneous.rb +9 -0
  27. data/lib/alf/tuple.rb +5 -3
  28. data/lib/alf/types.rb +2 -0
  29. data/lib/alf/types/ordering.rb +2 -2
  30. data/lib/alf/types/selection.rb +12 -1
  31. data/lib/alf/types/tuple_expression.rb +7 -3
  32. data/lib/alf/types/type_check.rb +28 -11
  33. data/tasks/gem.rake +7 -72
  34. metadata +8 -1312
  35. data/spec/compiler_helper.rb +0 -20
  36. data/spec/integration/__database__/group.alf +0 -3
  37. data/spec/integration/__database__/parts.rash +0 -6
  38. data/spec/integration/__database__/suppliers.rash +0 -5
  39. data/spec/integration/__database__/suppliers_csv.csv +0 -6
  40. data/spec/integration/__database__/supplies.rash +0 -12
  41. data/spec/integration/ext/test_relation.rb +0 -16
  42. data/spec/integration/relation/test_extend.rb +0 -20
  43. data/spec/integration/relation/test_to_array.rb +0 -28
  44. data/spec/integration/test_alf.rb +0 -8
  45. data/spec/integration/test_examples.rb +0 -38
  46. data/spec/optimizer_helper.rb +0 -19
  47. data/spec/regression/heading/test_heading_with_date.rb +0 -12
  48. data/spec/regression/relation/test_coerce.rb +0 -24
  49. data/spec/regression/relation/test_relation_allbut_all.rb +0 -14
  50. data/spec/regression/relation/test_relation_with_date.rb +0 -12
  51. data/spec/regression/relation/test_restrict.rb +0 -21
  52. data/spec/regression/restrict/test_restrict_with_keywords.rb +0 -17
  53. data/spec/shared/a_cog.rb +0 -40
  54. data/spec/shared/a_scope.rb +0 -21
  55. data/spec/shared/a_valid_type_implementation.rb +0 -44
  56. data/spec/shared/a_value.rb +0 -12
  57. data/spec/shared/an_operator_class.rb +0 -49
  58. data/spec/spec_helper.rb +0 -80
  59. data/spec/type_check_helper.rb +0 -1
  60. data/spec/unit/alf-adapter-fs/folder/fixtures/suppliers.rash +0 -5
  61. data/spec/unit/alf-adapter-fs/folder/test_adapter_class.rb +0 -23
  62. data/spec/unit/alf-adapter-fs/folder/test_adapter_instance.rb +0 -17
  63. data/spec/unit/alf-adapter/adapter/test_factor.rb +0 -20
  64. data/spec/unit/alf-adapter/connection/schema_cached/test_delegate.rb +0 -14
  65. data/spec/unit/alf-adapter/connection/schema_cached/test_heading.rb +0 -12
  66. data/spec/unit/alf-adapter/connection/schema_cached/test_keys.rb +0 -12
  67. data/spec/unit/alf-adapter/connection/schema_cached/test_knows.rb +0 -12
  68. data/spec/unit/alf-adapter/connection/test_lock.rb +0 -16
  69. data/spec/unit/alf-adapter/connection/test_migrate.rb +0 -17
  70. data/spec/unit/alf-adapter/shared_examples/a_cached_connection_method.rb +0 -30
  71. data/spec/unit/alf-adapter/shared_examples/an_adapter.rb +0 -34
  72. data/spec/unit/alf-adapter/shared_examples/an_adapter_class.rb +0 -21
  73. data/spec/unit/alf-adapter/shared_examples/an_adapter_with_readable_cogs.rb +0 -31
  74. data/spec/unit/alf-adapter/shared_examples/an_uncached_connection_method.rb +0 -21
  75. data/spec/unit/alf-aggregator/test_avg.rb +0 -22
  76. data/spec/unit/alf-aggregator/test_collect.rb +0 -25
  77. data/spec/unit/alf-aggregator/test_concat.rb +0 -39
  78. data/spec/unit/alf-aggregator/test_count.rb +0 -17
  79. data/spec/unit/alf-aggregator/test_max.rb +0 -23
  80. data/spec/unit/alf-aggregator/test_min.rb +0 -23
  81. data/spec/unit/alf-aggregator/test_stddev.rb +0 -27
  82. data/spec/unit/alf-aggregator/test_sum.rb +0 -23
  83. data/spec/unit/alf-aggregator/test_variance.rb +0 -29
  84. data/spec/unit/alf-algebra/operand/named/test_hash_and_equal.rb +0 -53
  85. data/spec/unit/alf-algebra/operand/named/test_keys.rb +0 -22
  86. data/spec/unit/alf-algebra/operand/named/test_to_ascii_tree.rb +0 -18
  87. data/spec/unit/alf-algebra/operand/named/test_to_cog.rb +0 -24
  88. data/spec/unit/alf-algebra/operand/named/test_to_relvar.rb +0 -18
  89. data/spec/unit/alf-algebra/operand/named/test_type_check.rb +0 -38
  90. data/spec/unit/alf-algebra/operand/proxy/test_to_cog.rb +0 -42
  91. data/spec/unit/alf-algebra/operand/test_coerce.rb +0 -37
  92. data/spec/unit/alf-algebra/operand/test_proxy.rb +0 -54
  93. data/spec/unit/alf-algebra/operator/allbut/test_key_preserving.rb +0 -55
  94. data/spec/unit/alf-algebra/operator/allbut/test_keys.rb +0 -52
  95. data/spec/unit/alf-algebra/operator/allbut/test_type_check.rb +0 -42
  96. data/spec/unit/alf-algebra/operator/autonum/test_heading.rb +0 -22
  97. data/spec/unit/alf-algebra/operator/autonum/test_keys.rb +0 -22
  98. data/spec/unit/alf-algebra/operator/autonum/test_type_check.rb +0 -30
  99. data/spec/unit/alf-algebra/operator/clip/test_heading.rb +0 -36
  100. data/spec/unit/alf-algebra/operator/clip/test_keys.rb +0 -48
  101. data/spec/unit/alf-algebra/operator/clip/test_type_check.rb +0 -42
  102. data/spec/unit/alf-algebra/operator/coerce/test_heading.rb +0 -23
  103. data/spec/unit/alf-algebra/operator/coerce/test_keys.rb +0 -23
  104. data/spec/unit/alf-algebra/operator/coerce/test_type_check.rb +0 -42
  105. data/spec/unit/alf-algebra/operator/commons/test_resulting_type.rb +0 -20
  106. data/spec/unit/alf-algebra/operator/commons/test_to_ascii_tree.rb +0 -40
  107. data/spec/unit/alf-algebra/operator/commons/test_with_operands.rb +0 -42
  108. data/spec/unit/alf-algebra/operator/compact/test_heading.rb +0 -23
  109. data/spec/unit/alf-algebra/operator/compact/test_keys.rb +0 -38
  110. data/spec/unit/alf-algebra/operator/defaults/test_heading.rb +0 -48
  111. data/spec/unit/alf-algebra/operator/defaults/test_keys.rb +0 -22
  112. data/spec/unit/alf-algebra/operator/extend/test_heading.rb +0 -37
  113. data/spec/unit/alf-algebra/operator/extend/test_keys.rb +0 -30
  114. data/spec/unit/alf-algebra/operator/extend/test_type_check.rb +0 -42
  115. data/spec/unit/alf-algebra/operator/frame/test_type_check.rb +0 -54
  116. data/spec/unit/alf-algebra/operator/generator/test_heading.rb +0 -19
  117. data/spec/unit/alf-algebra/operator/generator/test_keys.rb +0 -19
  118. data/spec/unit/alf-algebra/operator/group/test_heading.rb +0 -33
  119. data/spec/unit/alf-algebra/operator/group/test_keys.rb +0 -65
  120. data/spec/unit/alf-algebra/operator/group/test_type_check.rb +0 -50
  121. data/spec/unit/alf-algebra/operator/hierarchize/test_heading.rb +0 -23
  122. data/spec/unit/alf-algebra/operator/hierarchize/test_type_check.rb +0 -54
  123. data/spec/unit/alf-algebra/operator/intersect/test_heading.rb +0 -39
  124. data/spec/unit/alf-algebra/operator/intersect/test_keys.rb +0 -67
  125. data/spec/unit/alf-algebra/operator/intersect/test_type_check.rb +0 -30
  126. data/spec/unit/alf-algebra/operator/join/test_heading.rb +0 -39
  127. data/spec/unit/alf-algebra/operator/join/test_keys.rb +0 -59
  128. data/spec/unit/alf-algebra/operator/join/test_type_check.rb +0 -62
  129. data/spec/unit/alf-algebra/operator/matching/test_heading.rb +0 -26
  130. data/spec/unit/alf-algebra/operator/matching/test_keys.rb +0 -43
  131. data/spec/unit/alf-algebra/operator/matching/test_type_check.rb +0 -62
  132. data/spec/unit/alf-algebra/operator/minus/test_heading.rb +0 -26
  133. data/spec/unit/alf-algebra/operator/minus/test_keys.rb +0 -26
  134. data/spec/unit/alf-algebra/operator/minus/test_type_check.rb +0 -30
  135. data/spec/unit/alf-algebra/operator/not_matching/test_heading.rb +0 -26
  136. data/spec/unit/alf-algebra/operator/not_matching/test_keys.rb +0 -26
  137. data/spec/unit/alf-algebra/operator/not_matching/test_type_check.rb +0 -62
  138. data/spec/unit/alf-algebra/operator/page/test_type_check.rb +0 -50
  139. data/spec/unit/alf-algebra/operator/project/test_heading.rb +0 -36
  140. data/spec/unit/alf-algebra/operator/project/test_key_preserving.rb +0 -58
  141. data/spec/unit/alf-algebra/operator/project/test_keys.rb +0 -89
  142. data/spec/unit/alf-algebra/operator/project/test_type_check.rb +0 -42
  143. data/spec/unit/alf-algebra/operator/quota/test_heading.rb +0 -23
  144. data/spec/unit/alf-algebra/operator/quota/test_keys.rb +0 -23
  145. data/spec/unit/alf-algebra/operator/quota/test_type_check.rb +0 -54
  146. data/spec/unit/alf-algebra/operator/rank/test_heading.rb +0 -23
  147. data/spec/unit/alf-algebra/operator/rank/test_keys.rb +0 -36
  148. data/spec/unit/alf-algebra/operator/rank/test_type_check.rb +0 -42
  149. data/spec/unit/alf-algebra/operator/rename/test_complete_renaming.rb +0 -23
  150. data/spec/unit/alf-algebra/operator/rename/test_heading.rb +0 -23
  151. data/spec/unit/alf-algebra/operator/rename/test_keys.rb +0 -23
  152. data/spec/unit/alf-algebra/operator/rename/test_type_check.rb +0 -42
  153. data/spec/unit/alf-algebra/operator/restrict/test_heading.rb +0 -23
  154. data/spec/unit/alf-algebra/operator/restrict/test_keys.rb +0 -52
  155. data/spec/unit/alf-algebra/operator/restrict/test_type_check.rb +0 -46
  156. data/spec/unit/alf-algebra/operator/shared/test_to_cog.rb +0 -34
  157. data/spec/unit/alf-algebra/operator/sort/test_heading.rb +0 -23
  158. data/spec/unit/alf-algebra/operator/sort/test_keys.rb +0 -24
  159. data/spec/unit/alf-algebra/operator/sort/test_type_check.rb +0 -30
  160. data/spec/unit/alf-algebra/operator/summarize/test_heading.rb +0 -36
  161. data/spec/unit/alf-algebra/operator/summarize/test_keys.rb +0 -47
  162. data/spec/unit/alf-algebra/operator/summarize/test_type_check.rb +0 -42
  163. data/spec/unit/alf-algebra/operator/test_autonum.rb +0 -32
  164. data/spec/unit/alf-algebra/operator/test_clip.rb +0 -32
  165. data/spec/unit/alf-algebra/operator/test_coerce.rb +0 -20
  166. data/spec/unit/alf-algebra/operator/test_compact.rb +0 -16
  167. data/spec/unit/alf-algebra/operator/test_defaults.rb +0 -32
  168. data/spec/unit/alf-algebra/operator/test_extend.rb +0 -16
  169. data/spec/unit/alf-algebra/operator/test_generator.rb +0 -23
  170. data/spec/unit/alf-algebra/operator/test_group.rb +0 -31
  171. data/spec/unit/alf-algebra/operator/test_hash_and_equal.rb +0 -59
  172. data/spec/unit/alf-algebra/operator/test_intersect.rb +0 -16
  173. data/spec/unit/alf-algebra/operator/test_join.rb +0 -16
  174. data/spec/unit/alf-algebra/operator/test_minus.rb +0 -16
  175. data/spec/unit/alf-algebra/operator/test_page.rb +0 -30
  176. data/spec/unit/alf-algebra/operator/test_project.rb +0 -32
  177. data/spec/unit/alf-algebra/operator/test_quota.rb +0 -19
  178. data/spec/unit/alf-algebra/operator/test_rank.rb +0 -16
  179. data/spec/unit/alf-algebra/operator/test_rename.rb +0 -16
  180. data/spec/unit/alf-algebra/operator/test_restrict.rb +0 -16
  181. data/spec/unit/alf-algebra/operator/test_sort.rb +0 -16
  182. data/spec/unit/alf-algebra/operator/test_summarize.rb +0 -36
  183. data/spec/unit/alf-algebra/operator/test_ungroup.rb +0 -16
  184. data/spec/unit/alf-algebra/operator/test_union.rb +0 -16
  185. data/spec/unit/alf-algebra/operator/test_unwrap.rb +0 -16
  186. data/spec/unit/alf-algebra/operator/test_wrap.rb +0 -32
  187. data/spec/unit/alf-algebra/operator/ungroup/test_heading.rb +0 -20
  188. data/spec/unit/alf-algebra/operator/ungroup/test_keys.rb +0 -23
  189. data/spec/unit/alf-algebra/operator/ungroup/test_type_check.rb +0 -44
  190. data/spec/unit/alf-algebra/operator/union/test_heading.rb +0 -36
  191. data/spec/unit/alf-algebra/operator/union/test_keys.rb +0 -26
  192. data/spec/unit/alf-algebra/operator/union/test_type_check.rb +0 -30
  193. data/spec/unit/alf-algebra/operator/unwrap/test_heading.rb +0 -20
  194. data/spec/unit/alf-algebra/operator/unwrap/test_keys.rb +0 -20
  195. data/spec/unit/alf-algebra/operator/unwrap/test_type_check.rb +0 -44
  196. data/spec/unit/alf-algebra/operator/wrap/test_heading.rb +0 -33
  197. data/spec/unit/alf-algebra/operator/wrap/test_keys.rb +0 -49
  198. data/spec/unit/alf-algebra/operator/wrap/test_type_check.rb +0 -50
  199. data/spec/unit/alf-algebra/support/binary/test_with_left.rb +0 -27
  200. data/spec/unit/alf-algebra/support/binary/test_with_right.rb +0 -27
  201. data/spec/unit/alf-algebra/support/signature/test_collect_on.rb +0 -41
  202. data/spec/unit/alf-algebra/support/signature/test_initialize.rb +0 -20
  203. data/spec/unit/alf-algebra/support/signature/test_install.rb +0 -56
  204. data/spec/unit/alf-algebra/support/signature/test_option_parser.rb +0 -36
  205. data/spec/unit/alf-algebra/support/signature/test_parse_args.rb +0 -92
  206. data/spec/unit/alf-algebra/support/signature/test_to_lispy.rb +0 -117
  207. data/spec/unit/alf-algebra/support/test_non_relational.rb +0 -22
  208. data/spec/unit/alf-algebra/support/test_relational.rb +0 -36
  209. data/spec/unit/alf-algebra/support/unary/test_with_operand.rb +0 -28
  210. data/spec/unit/alf-algebra/support/with_ordering/test_total_ordering.rb +0 -61
  211. data/spec/unit/alf-algebra/test_operator.rb +0 -18
  212. data/spec/unit/alf-algebra/test_rewriter.rb +0 -29
  213. data/spec/unit/alf-compiler/default/test_allbut.rb +0 -65
  214. data/spec/unit/alf-compiler/default/test_autonum.rb +0 -30
  215. data/spec/unit/alf-compiler/default/test_clip.rb +0 -30
  216. data/spec/unit/alf-compiler/default/test_coerce.rb +0 -30
  217. data/spec/unit/alf-compiler/default/test_compact.rb +0 -26
  218. data/spec/unit/alf-compiler/default/test_completude.rb +0 -16
  219. data/spec/unit/alf-compiler/default/test_defaults.rb +0 -50
  220. data/spec/unit/alf-compiler/default/test_extend.rb +0 -34
  221. data/spec/unit/alf-compiler/default/test_frame.rb +0 -77
  222. data/spec/unit/alf-compiler/default/test_generator.rb +0 -30
  223. data/spec/unit/alf-compiler/default/test_group.rb +0 -38
  224. data/spec/unit/alf-compiler/default/test_hierarchize.rb +0 -40
  225. data/spec/unit/alf-compiler/default/test_intersect.rb +0 -34
  226. data/spec/unit/alf-compiler/default/test_join.rb +0 -34
  227. data/spec/unit/alf-compiler/default/test_matching.rb +0 -38
  228. data/spec/unit/alf-compiler/default/test_minus.rb +0 -38
  229. data/spec/unit/alf-compiler/default/test_not_matching.rb +0 -38
  230. data/spec/unit/alf-compiler/default/test_page.rb +0 -91
  231. data/spec/unit/alf-compiler/default/test_project.rb +0 -76
  232. data/spec/unit/alf-compiler/default/test_quota.rb +0 -88
  233. data/spec/unit/alf-compiler/default/test_rank.rb +0 -71
  234. data/spec/unit/alf-compiler/default/test_rename.rb +0 -30
  235. data/spec/unit/alf-compiler/default/test_restrict.rb +0 -34
  236. data/spec/unit/alf-compiler/default/test_sort.rb +0 -81
  237. data/spec/unit/alf-compiler/default/test_summarize.rb +0 -85
  238. data/spec/unit/alf-compiler/default/test_ungroup.rb +0 -30
  239. data/spec/unit/alf-compiler/default/test_union.rb +0 -36
  240. data/spec/unit/alf-compiler/default/test_unwrap.rb +0 -30
  241. data/spec/unit/alf-compiler/default/test_wrap.rb +0 -38
  242. data/spec/unit/alf-compiler/shared/compiled_examples.rb +0 -111
  243. data/spec/unit/alf-compiler/test_principle.rb +0 -332
  244. data/spec/unit/alf-core/alf/example.rash +0 -1
  245. data/spec/unit/alf-core/alf/test_Relation.rb +0 -28
  246. data/spec/unit/alf-core/alf/test_connect.rb +0 -25
  247. data/spec/unit/alf-core/alf/test_database.rb +0 -21
  248. data/spec/unit/alf-core/alf/test_reader.rb +0 -22
  249. data/spec/unit/alf-core/assumptions/test_file.rb +0 -16
  250. data/spec/unit/alf-core/assumptions/test_instance_eval.rb +0 -15
  251. data/spec/unit/alf-core/assumptions/test_scoping.rb +0 -29
  252. data/spec/unit/alf-core/assumptions/test_set.rb +0 -64
  253. data/spec/unit/alf-core/test_aggregator.rb +0 -35
  254. data/spec/unit/alf-database/connection/test_assert.rb +0 -36
  255. data/spec/unit/alf-database/connection/test_close.rb +0 -28
  256. data/spec/unit/alf-database/connection/test_deny.rb +0 -36
  257. data/spec/unit/alf-database/connection/test_fact.rb +0 -48
  258. data/spec/unit/alf-database/connection/test_lock.rb +0 -19
  259. data/spec/unit/alf-database/connection/test_migrate.rb +0 -27
  260. data/spec/unit/alf-database/connection/test_new.rb +0 -17
  261. data/spec/unit/alf-database/connection/test_options.rb +0 -16
  262. data/spec/unit/alf-database/connection/test_parse.rb +0 -60
  263. data/spec/unit/alf-database/connection/test_query.rb +0 -22
  264. data/spec/unit/alf-database/connection/test_reconnect.rb +0 -41
  265. data/spec/unit/alf-database/connection/test_relvar.rb +0 -34
  266. data/spec/unit/alf-database/connection/test_tuple_extract.rb +0 -38
  267. data/spec/unit/alf-database/database/test_connect.rb +0 -44
  268. data/spec/unit/alf-database/database/test_connection.rb +0 -21
  269. data/spec/unit/alf-database/database/test_default_options.rb +0 -14
  270. data/spec/unit/alf-database/database/test_new.rb +0 -53
  271. data/spec/unit/alf-database/options/test_freeze.rb +0 -20
  272. data/spec/unit/alf-database/options/test_merge.rb +0 -26
  273. data/spec/unit/alf-database/options/test_new.rb +0 -64
  274. data/spec/unit/alf-database/options/test_parser.rb +0 -23
  275. data/spec/unit/alf-database/options/test_schema_cache.rb +0 -29
  276. data/spec/unit/alf-database/options/test_viewpoint.rb +0 -25
  277. data/spec/unit/alf-database/shared_examples/a_facade_on_database_options.rb +0 -5
  278. data/spec/unit/alf-engine/cog/test_to_ascii_tree.rb +0 -14
  279. data/spec/unit/alf-engine/cog/test_to_cog.rb +0 -14
  280. data/spec/unit/alf-engine/compact/test_set.rb +0 -33
  281. data/spec/unit/alf-engine/compact/test_uniq.rb +0 -33
  282. data/spec/unit/alf-engine/group/test_hash.rb +0 -29
  283. data/spec/unit/alf-engine/hierarchize/test_renamer.rb +0 -18
  284. data/spec/unit/alf-engine/infer_heading/test_heading.rb +0 -30
  285. data/spec/unit/alf-engine/join/test_hash.rb +0 -55
  286. data/spec/unit/alf-engine/materialize/test_array.rb +0 -28
  287. data/spec/unit/alf-engine/materialize/test_hash.rb +0 -76
  288. data/spec/unit/alf-engine/quota/test_cesure.rb +0 -34
  289. data/spec/unit/alf-engine/rank/test_cesure.rb +0 -47
  290. data/spec/unit/alf-engine/semi/test_hash.rb +0 -58
  291. data/spec/unit/alf-engine/sort/test_in_memory.rb +0 -32
  292. data/spec/unit/alf-engine/summarize/test_cesure.rb +0 -36
  293. data/spec/unit/alf-engine/summarize/test_hash.rb +0 -36
  294. data/spec/unit/alf-engine/test_aggregate.rb +0 -26
  295. data/spec/unit/alf-engine/test_autonum.rb +0 -24
  296. data/spec/unit/alf-engine/test_clip.rb +0 -34
  297. data/spec/unit/alf-engine/test_coerce.rb +0 -35
  298. data/spec/unit/alf-engine/test_compact.rb +0 -33
  299. data/spec/unit/alf-engine/test_concat.rb +0 -38
  300. data/spec/unit/alf-engine/test_defaults.rb +0 -37
  301. data/spec/unit/alf-engine/test_filter.rb +0 -55
  302. data/spec/unit/alf-engine/test_generator.rb +0 -25
  303. data/spec/unit/alf-engine/test_hierarchize.rb +0 -71
  304. data/spec/unit/alf-engine/test_infer_heading.rb +0 -58
  305. data/spec/unit/alf-engine/test_rename.rb +0 -24
  306. data/spec/unit/alf-engine/test_set_attr.rb +0 -51
  307. data/spec/unit/alf-engine/test_sort.rb +0 -32
  308. data/spec/unit/alf-engine/test_take.rb +0 -46
  309. data/spec/unit/alf-engine/test_to_array.rb +0 -75
  310. data/spec/unit/alf-engine/test_type_safe.rb +0 -33
  311. data/spec/unit/alf-engine/test_ungroup.rb +0 -28
  312. data/spec/unit/alf-engine/test_unwrap.rb +0 -20
  313. data/spec/unit/alf-engine/test_wrap.rb +0 -26
  314. data/spec/unit/alf-io/reader/class/test_by_mime_type.rb +0 -32
  315. data/spec/unit/alf-io/reader/input.csv +0 -3
  316. data/spec/unit/alf-io/reader/input.rash +0 -2
  317. data/spec/unit/alf-io/reader/input.ruby +0 -4
  318. data/spec/unit/alf-io/reader/test_csv.rb +0 -67
  319. data/spec/unit/alf-io/reader/test_initialize.rb +0 -74
  320. data/spec/unit/alf-io/reader/test_json.rb +0 -30
  321. data/spec/unit/alf-io/reader/test_rash.rb +0 -32
  322. data/spec/unit/alf-io/reader/test_ruby.rb +0 -25
  323. data/spec/unit/alf-io/reader/test_yaml.rb +0 -30
  324. data/spec/unit/alf-io/renderer/class/test_by_mime_type.rb +0 -30
  325. data/spec/unit/alf-io/renderer/test_csv.rb +0 -68
  326. data/spec/unit/alf-io/renderer/test_initialize.rb +0 -40
  327. data/spec/unit/alf-io/renderer/test_json.rb +0 -42
  328. data/spec/unit/alf-io/renderer/test_rash.rb +0 -36
  329. data/spec/unit/alf-io/renderer/test_text.rb +0 -47
  330. data/spec/unit/alf-io/renderer/test_yaml.rb +0 -33
  331. data/spec/unit/alf-io/renderer/text/test_cell.rb +0 -35
  332. data/spec/unit/alf-io/renderer/text/test_row.rb +0 -30
  333. data/spec/unit/alf-io/renderer/text/test_table.rb +0 -39
  334. data/spec/unit/alf-io/shared_examples/a_reader_class.rb +0 -19
  335. data/spec/unit/alf-io/shared_examples/a_renderer_class.rb +0 -24
  336. data/spec/unit/alf-io/support/test_proc_io.rb +0 -18
  337. data/spec/unit/alf-io/test_reader.rb +0 -36
  338. data/spec/unit/alf-io/test_renderer.rb +0 -43
  339. data/spec/unit/alf-lang/functional/test_aggregation.rb +0 -40
  340. data/spec/unit/alf-lang/functional/test_relation.rb +0 -21
  341. data/spec/unit/alf-lang/functional/test_tuple.rb +0 -21
  342. data/spec/unit/alf-lang/object_oriented/test_rendering_methods.rb +0 -38
  343. data/spec/unit/alf-lang/object_oriented/test_to_array.rb +0 -45
  344. data/spec/unit/alf-lang/object_oriented/test_to_rash.rb +0 -34
  345. data/spec/unit/alf-lang/object_oriented/test_tuple_extract.rb +0 -51
  346. data/spec/unit/alf-lang/parser/lispy/test_connection_bang.rb +0 -28
  347. data/spec/unit/alf-lang/parser/lispy/test_parse.rb +0 -38
  348. data/spec/unit/alf-lang/parser/lispy/test_to_s.rb +0 -16
  349. data/spec/unit/alf-lang/parser/safer/safe.txt +0 -5
  350. data/spec/unit/alf-lang/parser/safer/test_parse.rb +0 -82
  351. data/spec/unit/alf-lang/parser/safer/unsafe.txt +0 -14
  352. data/spec/unit/alf-lang/test_predicates.rb +0 -17
  353. data/spec/unit/alf-optimizer/optimizer/test_search.rb +0 -48
  354. data/spec/unit/alf-optimizer/restrict/test_on_autonum.rb +0 -41
  355. data/spec/unit/alf-optimizer/restrict/test_on_coerce.rb +0 -42
  356. data/spec/unit/alf-optimizer/restrict/test_on_join.rb +0 -107
  357. data/spec/unit/alf-optimizer/restrict/test_on_matching.rb +0 -41
  358. data/spec/unit/alf-optimizer/shared/a_pass_through_expression_for_restrict.rb +0 -36
  359. data/spec/unit/alf-optimizer/shared/a_split_able_expression_for_restrict.rb +0 -46
  360. data/spec/unit/alf-optimizer/shared/an_optimizable_expression_for_restrict.rb +0 -39
  361. data/spec/unit/alf-optimizer/shared/an_unoptimizable_expression_for_restrict.rb +0 -24
  362. data/spec/unit/alf-optimizer/test_autonum.rb +0 -12
  363. data/spec/unit/alf-optimizer/test_clip.rb +0 -10
  364. data/spec/unit/alf-optimizer/test_coerce.rb +0 -12
  365. data/spec/unit/alf-optimizer/test_compact.rb +0 -10
  366. data/spec/unit/alf-optimizer/test_defaults.rb +0 -12
  367. data/spec/unit/alf-optimizer/test_extend.rb +0 -12
  368. data/spec/unit/alf-optimizer/test_generator.rb +0 -9
  369. data/spec/unit/alf-optimizer/test_group.rb +0 -12
  370. data/spec/unit/alf-optimizer/test_intersect.rb +0 -10
  371. data/spec/unit/alf-optimizer/test_minus.rb +0 -10
  372. data/spec/unit/alf-optimizer/test_project.rb +0 -10
  373. data/spec/unit/alf-optimizer/test_quota.rb +0 -16
  374. data/spec/unit/alf-optimizer/test_rank.rb +0 -12
  375. data/spec/unit/alf-optimizer/test_rename.rb +0 -26
  376. data/spec/unit/alf-optimizer/test_sort.rb +0 -10
  377. data/spec/unit/alf-optimizer/test_summarize.rb +0 -15
  378. data/spec/unit/alf-optimizer/test_union.rb +0 -10
  379. data/spec/unit/alf-optimizer/test_wrap.rb +0 -12
  380. data/spec/unit/alf-predicate/expr/test_to_proc.rb +0 -18
  381. data/spec/unit/alf-predicate/expr/test_to_ruby_code.rb +0 -154
  382. data/spec/unit/alf-predicate/factory/shared/a_comparison_factory_method.rb +0 -35
  383. data/spec/unit/alf-predicate/factory/shared/a_predicate_ast_node.rb +0 -20
  384. data/spec/unit/alf-predicate/factory/test_and.rb +0 -15
  385. data/spec/unit/alf-predicate/factory/test_between.rb +0 -14
  386. data/spec/unit/alf-predicate/factory/test_comp.rb +0 -37
  387. data/spec/unit/alf-predicate/factory/test_contradiction.rb +0 -13
  388. data/spec/unit/alf-predicate/factory/test_eq.rb +0 -11
  389. data/spec/unit/alf-predicate/factory/test_factor_predicate.rb +0 -52
  390. data/spec/unit/alf-predicate/factory/test_gt.rb +0 -11
  391. data/spec/unit/alf-predicate/factory/test_gte.rb +0 -11
  392. data/spec/unit/alf-predicate/factory/test_identifier.rb +0 -15
  393. data/spec/unit/alf-predicate/factory/test_in.rb +0 -14
  394. data/spec/unit/alf-predicate/factory/test_literal.rb +0 -15
  395. data/spec/unit/alf-predicate/factory/test_lt.rb +0 -11
  396. data/spec/unit/alf-predicate/factory/test_lte.rb +0 -11
  397. data/spec/unit/alf-predicate/factory/test_native.rb +0 -21
  398. data/spec/unit/alf-predicate/factory/test_neq.rb +0 -11
  399. data/spec/unit/alf-predicate/factory/test_not.rb +0 -15
  400. data/spec/unit/alf-predicate/factory/test_or.rb +0 -15
  401. data/spec/unit/alf-predicate/factory/test_qualified_identifier.rb +0 -17
  402. data/spec/unit/alf-predicate/factory/test_tautology.rb +0 -14
  403. data/spec/unit/alf-predicate/grammar/test_match.rb +0 -95
  404. data/spec/unit/alf-predicate/grammar/test_sexpr.rb +0 -105
  405. data/spec/unit/alf-predicate/nodes/and/test_and_split.rb +0 -68
  406. data/spec/unit/alf-predicate/nodes/dyadic_comp/test_and_split.rb +0 -47
  407. data/spec/unit/alf-predicate/nodes/identifier/test_and_split.rb +0 -25
  408. data/spec/unit/alf-predicate/nodes/identifier/test_free_variables.rb +0 -14
  409. data/spec/unit/alf-predicate/nodes/identifier/test_name.rb +0 -14
  410. data/spec/unit/alf-predicate/nodes/nadic_bool/test_free_variables.rb +0 -16
  411. data/spec/unit/alf-predicate/nodes/qualified_identifier/test_and_split.rb +0 -25
  412. data/spec/unit/alf-predicate/nodes/qualified_identifier/test_free_variables.rb +0 -14
  413. data/spec/unit/alf-predicate/nodes/qualified_identifier/test_name.rb +0 -14
  414. data/spec/unit/alf-predicate/nodes/qualified_identifier/test_qualifier.rb +0 -14
  415. data/spec/unit/alf-predicate/predicate/test_and_split.rb +0 -59
  416. data/spec/unit/alf-predicate/predicate/test_bool_and.rb +0 -36
  417. data/spec/unit/alf-predicate/predicate/test_bool_not.rb +0 -70
  418. data/spec/unit/alf-predicate/predicate/test_bool_or.rb +0 -36
  419. data/spec/unit/alf-predicate/predicate/test_coerce.rb +0 -132
  420. data/spec/unit/alf-predicate/predicate/test_constant_variables.rb +0 -54
  421. data/spec/unit/alf-predicate/predicate/test_contradiction.rb +0 -28
  422. data/spec/unit/alf-predicate/predicate/test_evaluate.rb +0 -70
  423. data/spec/unit/alf-predicate/predicate/test_factory_methods.rb +0 -79
  424. data/spec/unit/alf-predicate/predicate/test_free_variables.rb +0 -16
  425. data/spec/unit/alf-predicate/predicate/test_hash_and_equal.rb +0 -28
  426. data/spec/unit/alf-predicate/predicate/test_qualify.rb +0 -36
  427. data/spec/unit/alf-predicate/predicate/test_rename.rb +0 -78
  428. data/spec/unit/alf-predicate/predicate/test_tautology.rb +0 -28
  429. data/spec/unit/alf-predicate/predicate/test_to_proc.rb +0 -16
  430. data/spec/unit/alf-predicate/predicate/test_to_ruby_code.rb +0 -22
  431. data/spec/unit/alf-predicate/predicate/test_to_ruby_literal.rb +0 -16
  432. data/spec/unit/alf-predicate/test_predicate.rb +0 -131
  433. data/spec/unit/alf-relation/relation/class/test_coerce.rb +0 -62
  434. data/spec/unit/alf-relation/relation/class/test_dum.rb +0 -19
  435. data/spec/unit/alf-relation/relation/class/test_recursive_type.rb +0 -42
  436. data/spec/unit/alf-relation/relation/class/test_type.rb +0 -31
  437. data/spec/unit/alf-relation/relation/factored-types/test_allbut.rb +0 -34
  438. data/spec/unit/alf-relation/relation/factored-types/test_coerce.rb +0 -45
  439. data/spec/unit/alf-relation/relation/factored-types/test_comparisons.rb +0 -69
  440. data/spec/unit/alf-relation/relation/factored-types/test_equality.rb +0 -28
  441. data/spec/unit/alf-relation/relation/factored-types/test_project.rb +0 -34
  442. data/spec/unit/alf-relation/relation/factored-types/test_rename.rb +0 -12
  443. data/spec/unit/alf-relation/relation/factored-types/test_split.rb +0 -30
  444. data/spec/unit/alf-relation/relation/factored-types/test_to_ruby_literal.rb +0 -18
  445. data/spec/unit/alf-relation/relation/factored-types/test_triple_equal.rb +0 -42
  446. data/spec/unit/alf-relation/relation/test_aggregation.rb +0 -36
  447. data/spec/unit/alf-relation/relation/test_equality.rb +0 -52
  448. data/spec/unit/alf-relation/relation/test_hash.rb +0 -28
  449. data/spec/unit/alf-relation/relation/test_heading.rb +0 -17
  450. data/spec/unit/alf-relation/relation/test_inspect.rb +0 -20
  451. data/spec/unit/alf-relation/relation/test_keys.rb +0 -17
  452. data/spec/unit/alf-relation/relation/test_relation.rb +0 -77
  453. data/spec/unit/alf-relation/relation/test_relops.rb +0 -74
  454. data/spec/unit/alf-relation/relation/test_sugar.rb +0 -40
  455. data/spec/unit/alf-relation/relation/test_to_a.rb +0 -37
  456. data/spec/unit/alf-relation/relation/test_to_hash.rb +0 -31
  457. data/spec/unit/alf-relation/relation/test_to_relation.rb +0 -14
  458. data/spec/unit/alf-relation/tuple/class/test_coerce.rb +0 -29
  459. data/spec/unit/alf-relation/tuple/class/test_type.rb +0 -27
  460. data/spec/unit/alf-relation/tuple/factored-types/test_allbut.rb +0 -34
  461. data/spec/unit/alf-relation/tuple/factored-types/test_coerce.rb +0 -91
  462. data/spec/unit/alf-relation/tuple/factored-types/test_comparisons.rb +0 -69
  463. data/spec/unit/alf-relation/tuple/factored-types/test_equality.rb +0 -28
  464. data/spec/unit/alf-relation/tuple/factored-types/test_project.rb +0 -34
  465. data/spec/unit/alf-relation/tuple/factored-types/test_rename.rb +0 -12
  466. data/spec/unit/alf-relation/tuple/factored-types/test_split.rb +0 -30
  467. data/spec/unit/alf-relation/tuple/factored-types/test_to_ruby_literal.rb +0 -18
  468. data/spec/unit/alf-relation/tuple/factored-types/test_triple_equal.rb +0 -56
  469. data/spec/unit/alf-relation/tuple/test_allbut.rb +0 -14
  470. data/spec/unit/alf-relation/tuple/test_attribute_accessors.rb +0 -36
  471. data/spec/unit/alf-relation/tuple/test_equality.rb +0 -28
  472. data/spec/unit/alf-relation/tuple/test_extend.rb +0 -30
  473. data/spec/unit/alf-relation/tuple/test_hash.rb +0 -28
  474. data/spec/unit/alf-relation/tuple/test_heading.rb +0 -20
  475. data/spec/unit/alf-relation/tuple/test_merge.rb +0 -24
  476. data/spec/unit/alf-relation/tuple/test_project.rb +0 -18
  477. data/spec/unit/alf-relation/tuple/test_remap.rb +0 -14
  478. data/spec/unit/alf-relation/tuple/test_rename.rb +0 -14
  479. data/spec/unit/alf-relation/tuple/test_split.rb +0 -28
  480. data/spec/unit/alf-relation/tuple/test_to_attr_list.rb +0 -12
  481. data/spec/unit/alf-relation/tuple/test_triple_equal.rb +0 -17
  482. data/spec/unit/alf-relvar/base/test_connection.rb +0 -20
  483. data/spec/unit/alf-relvar/base/test_delete.rb +0 -35
  484. data/spec/unit/alf-relvar/base/test_heading.rb +0 -22
  485. data/spec/unit/alf-relvar/base/test_insert.rb +0 -23
  486. data/spec/unit/alf-relvar/base/test_keys.rb +0 -22
  487. data/spec/unit/alf-relvar/base/test_lock.rb +0 -22
  488. data/spec/unit/alf-relvar/base/test_oo_lang.rb +0 -45
  489. data/spec/unit/alf-relvar/base/test_to_cog.rb +0 -22
  490. data/spec/unit/alf-relvar/base/test_to_lispy.rb +0 -15
  491. data/spec/unit/alf-relvar/base/test_to_relvar.rb +0 -15
  492. data/spec/unit/alf-relvar/base/test_to_s.rb +0 -15
  493. data/spec/unit/alf-relvar/base/test_update.rb +0 -25
  494. data/spec/unit/alf-relvar/read_only/test_to_relation.rb +0 -17
  495. data/spec/unit/alf-relvar/read_only/test_type.rb +0 -17
  496. data/spec/unit/alf-relvar/shared/test_empty.rb +0 -21
  497. data/spec/unit/alf-relvar/shared/test_empty_bang.rb +0 -31
  498. data/spec/unit/alf-relvar/shared/test_not_empty_bang.rb +0 -31
  499. data/spec/unit/alf-relvar/shared/test_to_relation.rb +0 -45
  500. data/spec/unit/alf-relvar/shared/test_type.rb +0 -21
  501. data/spec/unit/alf-relvar/shared/test_upsert.rb +0 -41
  502. data/spec/unit/alf-relvar/virtual/test_delete.rb +0 -40
  503. data/spec/unit/alf-relvar/virtual/test_expr.rb +0 -15
  504. data/spec/unit/alf-relvar/virtual/test_heading.rb +0 -21
  505. data/spec/unit/alf-relvar/virtual/test_insert.rb +0 -28
  506. data/spec/unit/alf-relvar/virtual/test_keys.rb +0 -21
  507. data/spec/unit/alf-relvar/virtual/test_oo_lang.rb +0 -30
  508. data/spec/unit/alf-relvar/virtual/test_to_cog.rb +0 -19
  509. data/spec/unit/alf-relvar/virtual/test_to_lispy.rb +0 -17
  510. data/spec/unit/alf-relvar/virtual/test_to_relvar.rb +0 -15
  511. data/spec/unit/alf-relvar/virtual/test_to_s.rb +0 -15
  512. data/spec/unit/alf-relvar/virtual/test_update.rb +0 -28
  513. data/spec/unit/alf-support/config/test_dup.rb +0 -58
  514. data/spec/unit/alf-support/config/test_freeze.rb +0 -37
  515. data/spec/unit/alf-support/config/test_hash_get.rb +0 -41
  516. data/spec/unit/alf-support/config/test_hash_set.rb +0 -61
  517. data/spec/unit/alf-support/config/test_helpers.rb +0 -33
  518. data/spec/unit/alf-support/config/test_merge.rb +0 -34
  519. data/spec/unit/alf-support/config/test_new.rb +0 -62
  520. data/spec/unit/alf-support/config/test_option.rb +0 -42
  521. data/spec/unit/alf-support/config/test_option_setter.rb +0 -72
  522. data/spec/unit/alf-support/config/test_options.rb +0 -22
  523. data/spec/unit/alf-support/scope/test_branch.rb +0 -28
  524. data/spec/unit/alf-support/scope/test_evaluate.rb +0 -42
  525. data/spec/unit/alf-support/scope/test_initialize.rb +0 -20
  526. data/spec/unit/alf-support/scope/test_respond_to.rb +0 -33
  527. data/spec/unit/alf-support/test_class_name.rb +0 -16
  528. data/spec/unit/alf-support/test_coerce.rb +0 -24
  529. data/spec/unit/alf-support/test_registry.rb +0 -63
  530. data/spec/unit/alf-support/test_ruby_case.rb +0 -16
  531. data/spec/unit/alf-support/test_rubycase_name.rb +0 -24
  532. data/spec/unit/alf-support/test_symbolize_keys.rb +0 -24
  533. data/spec/unit/alf-support/test_to_lispy.rb +0 -124
  534. data/spec/unit/alf-support/test_to_ruby_literal.rb +0 -26
  535. data/spec/unit/alf-support/test_to_tuple.rb +0 -29
  536. data/spec/unit/alf-support/test_tuple_scope.rb +0 -46
  537. data/spec/unit/alf-support/test_unsymbolize_keys.rb +0 -24
  538. data/spec/unit/alf-support/tuple_scope/test_evaluate.rb +0 -37
  539. data/spec/unit/alf-support/tuple_scope/test_hash_get.rb +0 -20
  540. data/spec/unit/alf-support/tuple_scope/test_respond_to.rb +0 -40
  541. data/spec/unit/alf-support/tuple_scope/test_to_s.rb +0 -22
  542. data/spec/unit/alf-types/attr_list/test_allbut.rb +0 -28
  543. data/spec/unit/alf-types/attr_list/test_ampersand.rb +0 -20
  544. data/spec/unit/alf-types/attr_list/test_coerce.rb +0 -68
  545. data/spec/unit/alf-types/attr_list/test_difference.rb +0 -20
  546. data/spec/unit/alf-types/attr_list/test_hash_and_eql.rb +0 -47
  547. data/spec/unit/alf-types/attr_list/test_include.rb +0 -22
  548. data/spec/unit/alf-types/attr_list/test_intersect.rb +0 -36
  549. data/spec/unit/alf-types/attr_list/test_or.rb +0 -20
  550. data/spec/unit/alf-types/attr_list/test_project.rb +0 -52
  551. data/spec/unit/alf-types/attr_list/test_project_tuple.rb +0 -31
  552. data/spec/unit/alf-types/attr_list/test_sameset.rb +0 -36
  553. data/spec/unit/alf-types/attr_list/test_set_compare.rb +0 -59
  554. data/spec/unit/alf-types/attr_list/test_split_tuple.rb +0 -31
  555. data/spec/unit/alf-types/attr_list/test_subset.rb +0 -50
  556. data/spec/unit/alf-types/attr_list/test_superset.rb +0 -50
  557. data/spec/unit/alf-types/attr_list/test_to_a.rb +0 -14
  558. data/spec/unit/alf-types/attr_list/test_to_ordering.rb +0 -19
  559. data/spec/unit/alf-types/attr_name/test_coerce.rb +0 -16
  560. data/spec/unit/alf-types/attr_name/test_triple_equal.rb +0 -27
  561. data/spec/unit/alf-types/heading/class/test_coerce.rb +0 -40
  562. data/spec/unit/alf-types/heading/class/test_infer.rb +0 -26
  563. data/spec/unit/alf-types/heading/test_allbut.rb +0 -12
  564. data/spec/unit/alf-types/heading/test_cardinality.rb +0 -25
  565. data/spec/unit/alf-types/heading/test_coerce.rb +0 -57
  566. data/spec/unit/alf-types/heading/test_comparison.rb +0 -96
  567. data/spec/unit/alf-types/heading/test_intersection.rb +0 -29
  568. data/spec/unit/alf-types/heading/test_merge.rb +0 -25
  569. data/spec/unit/alf-types/heading/test_project.rb +0 -20
  570. data/spec/unit/alf-types/heading/test_split.rb +0 -20
  571. data/spec/unit/alf-types/heading/test_to_h.rb +0 -24
  572. data/spec/unit/alf-types/heading/test_triple_equal.rb +0 -40
  573. data/spec/unit/alf-types/heading/test_union.rb +0 -33
  574. data/spec/unit/alf-types/keys/test_all.rb +0 -17
  575. data/spec/unit/alf-types/keys/test_ampersand.rb +0 -26
  576. data/spec/unit/alf-types/keys/test_any.rb +0 -17
  577. data/spec/unit/alf-types/keys/test_coerce.rb +0 -64
  578. data/spec/unit/alf-types/keys/test_empty.rb +0 -20
  579. data/spec/unit/alf-types/keys/test_first.rb +0 -17
  580. data/spec/unit/alf-types/keys/test_hash_and_equal.rb +0 -33
  581. data/spec/unit/alf-types/keys/test_if_empty.rb +0 -40
  582. data/spec/unit/alf-types/keys/test_map.rb +0 -17
  583. data/spec/unit/alf-types/keys/test_plus.rb +0 -26
  584. data/spec/unit/alf-types/keys/test_project.rb +0 -29
  585. data/spec/unit/alf-types/keys/test_reject.rb +0 -17
  586. data/spec/unit/alf-types/keys/test_rename.rb +0 -21
  587. data/spec/unit/alf-types/keys/test_select.rb +0 -66
  588. data/spec/unit/alf-types/ordering/test_coerce.rb +0 -77
  589. data/spec/unit/alf-types/ordering/test_compare.rb +0 -29
  590. data/spec/unit/alf-types/ordering/test_dive.rb +0 -41
  591. data/spec/unit/alf-types/ordering/test_hash_get.rb +0 -20
  592. data/spec/unit/alf-types/ordering/test_lte.rb +0 -43
  593. data/spec/unit/alf-types/ordering/test_merge.rb +0 -61
  594. data/spec/unit/alf-types/ordering/test_reverse.rb +0 -40
  595. data/spec/unit/alf-types/ordering/test_selectors.rb +0 -24
  596. data/spec/unit/alf-types/ordering/test_sorter.rb +0 -70
  597. data/spec/unit/alf-types/ordering/test_to_attr_list.rb +0 -26
  598. data/spec/unit/alf-types/ordering/test_total.rb +0 -56
  599. data/spec/unit/alf-types/renaming/test_coerce.rb +0 -24
  600. data/spec/unit/alf-types/renaming/test_complete.rb +0 -14
  601. data/spec/unit/alf-types/renaming/test_invert.rb +0 -14
  602. data/spec/unit/alf-types/renaming/test_rename_attr_list.rb +0 -24
  603. data/spec/unit/alf-types/renaming/test_rename_tuple.rb +0 -14
  604. data/spec/unit/alf-types/renaming/test_to_attr_list.rb +0 -14
  605. data/spec/unit/alf-types/selection/test_coerce.rb +0 -38
  606. data/spec/unit/alf-types/selection/test_select.rb +0 -34
  607. data/spec/unit/alf-types/selector/test_coerce.rb +0 -36
  608. data/spec/unit/alf-types/selector/test_composite_q.rb +0 -20
  609. data/spec/unit/alf-types/selector/test_dive.rb +0 -32
  610. data/spec/unit/alf-types/selector/test_select.rb +0 -40
  611. data/spec/unit/alf-types/selector/test_simple_q.rb +0 -20
  612. data/spec/unit/alf-types/selector/test_to_a.rb +0 -20
  613. data/spec/unit/alf-types/selector/test_to_lispy.rb +0 -20
  614. data/spec/unit/alf-types/selector/test_to_ruby_literal.rb +0 -20
  615. data/spec/unit/alf-types/size/test_coerce.rb +0 -23
  616. data/spec/unit/alf-types/size/test_triple_equal.rb +0 -25
  617. data/spec/unit/alf-types/summarization/test_coerce.rb +0 -31
  618. data/spec/unit/alf-types/summarization/test_least.rb +0 -11
  619. data/spec/unit/alf-types/summarization/test_summarize.rb +0 -15
  620. data/spec/unit/alf-types/test_attr_list.rb +0 -18
  621. data/spec/unit/alf-types/test_class_methods.rb +0 -59
  622. data/spec/unit/alf-types/test_heading.rb +0 -59
  623. data/spec/unit/alf-types/test_ordering.rb +0 -18
  624. data/spec/unit/alf-types/test_renaming.rb +0 -18
  625. data/spec/unit/alf-types/test_summarization.rb +0 -25
  626. data/spec/unit/alf-types/test_tuple_computation.rb +0 -28
  627. data/spec/unit/alf-types/test_tuple_expression.rb +0 -17
  628. data/spec/unit/alf-types/tuple_computation/test_coerce.rb +0 -45
  629. data/spec/unit/alf-types/tuple_computation/test_empty.rb +0 -24
  630. data/spec/unit/alf-types/tuple_computation/test_project.rb +0 -46
  631. data/spec/unit/alf-types/tuple_computation/test_to_attr_list.rb +0 -15
  632. data/spec/unit/alf-types/tuple_computation/test_to_heading.rb +0 -29
  633. data/spec/unit/alf-types/tuple_expression/test_coerce.rb +0 -35
  634. data/spec/unit/alf-types/tuple_expression/test_evaluate.rb +0 -30
  635. data/spec/unit/alf-types/tuple_expression/test_to_ruby_literal.rb +0 -11
  636. data/spec/unit/alf-types/type_check/test_triple_equal.rb +0 -58
  637. data/spec/unit/alf-update/deleter/test_autonum.rb +0 -31
  638. data/spec/unit/alf-update/deleter/test_clip.rb +0 -18
  639. data/spec/unit/alf-update/deleter/test_defaults.rb +0 -31
  640. data/spec/unit/alf-update/deleter/test_extend.rb +0 -31
  641. data/spec/unit/alf-update/deleter/test_group.rb +0 -31
  642. data/spec/unit/alf-update/deleter/test_identifier.rb +0 -19
  643. data/spec/unit/alf-update/deleter/test_intersect.rb +0 -21
  644. data/spec/unit/alf-update/deleter/test_project.rb +0 -18
  645. data/spec/unit/alf-update/deleter/test_rank.rb +0 -31
  646. data/spec/unit/alf-update/deleter/test_rename.rb +0 -31
  647. data/spec/unit/alf-update/deleter/test_restrict.rb +0 -20
  648. data/spec/unit/alf-update/deleter/test_sort.rb +0 -18
  649. data/spec/unit/alf-update/deleter/test_wrap.rb +0 -31
  650. data/spec/unit/alf-update/inserter/test_autonum.rb +0 -19
  651. data/spec/unit/alf-update/inserter/test_clip.rb +0 -21
  652. data/spec/unit/alf-update/inserter/test_compact.rb +0 -19
  653. data/spec/unit/alf-update/inserter/test_defaults.rb +0 -19
  654. data/spec/unit/alf-update/inserter/test_extend.rb +0 -19
  655. data/spec/unit/alf-update/inserter/test_group.rb +0 -26
  656. data/spec/unit/alf-update/inserter/test_identifier.rb +0 -18
  657. data/spec/unit/alf-update/inserter/test_intersect.rb +0 -22
  658. data/spec/unit/alf-update/inserter/test_join.rb +0 -21
  659. data/spec/unit/alf-update/inserter/test_matching.rb +0 -19
  660. data/spec/unit/alf-update/inserter/test_minus.rb +0 -19
  661. data/spec/unit/alf-update/inserter/test_not_matching.rb +0 -19
  662. data/spec/unit/alf-update/inserter/test_project.rb +0 -21
  663. data/spec/unit/alf-update/inserter/test_rank.rb +0 -19
  664. data/spec/unit/alf-update/inserter/test_rename.rb +0 -19
  665. data/spec/unit/alf-update/inserter/test_restrict.rb +0 -19
  666. data/spec/unit/alf-update/inserter/test_sort.rb +0 -19
  667. data/spec/unit/alf-update/inserter/test_union.rb +0 -22
  668. data/spec/unit/alf-update/inserter/test_wrap.rb +0 -25
  669. data/spec/unit/alf-update/updater/test_identifier.rb +0 -19
  670. data/spec/unit/alf-viewpoint/metadata/test_add_members.rb +0 -38
  671. data/spec/unit/alf-viewpoint/metadata/test_all_members.rb +0 -33
  672. data/spec/unit/alf-viewpoint/metadata/test_depends.rb +0 -50
  673. data/spec/unit/alf-viewpoint/metadata/test_dup.rb +0 -32
  674. data/spec/unit/alf-viewpoint/metadata/test_expand.rb +0 -31
  675. data/spec/unit/alf-viewpoint/metadata/test_expects.rb +0 -38
  676. data/spec/unit/alf-viewpoint/metadata/test_initialize.rb +0 -40
  677. data/spec/unit/alf-viewpoint/metadata/test_to_module.rb +0 -37
  678. data/spec/unit/alf-viewpoint/test_depends.rb +0 -18
  679. data/spec/unit/alf-viewpoint/test_expects.rb +0 -18
  680. data/spec/unit/alf-viewpoint/test_members.rb +0 -57
  681. data/spec/unit/alf-viewpoint/test_metadata.rb +0 -27
  682. data/spec/unit/alf-viewpoint/test_native.rb +0 -26
  683. data/spec/unit/alf-viewpoint/test_native_const.rb +0 -22
  684. data/spec/unit/alf-viewpoint/test_parse.rb +0 -36
  685. data/spec/unit/alf-viewpoint/test_parser.rb +0 -22
  686. data/spec/update_helper.rb +0 -85
@@ -1,4 +1,15 @@
1
- # 0.15.0 / FIX ME
1
+ # 0.16.0 / 2014-02-18
2
+
3
+ * Fixed Tuple(), it now accepts no argument and returns an empty tuple.
4
+ * Fixed inference of common super type when TrueClass/FalseClass/Boolean are
5
+ involved (for Relation#heading when infered from data).
6
+ * Fixed compilation of shortcut operators involving complex expressions.
7
+ * Make Ordering#compare robust to the presence of `nil`.
8
+ * Ensured Engine::Leaf correctly symbolize tuple keys of its input operand.
9
+ * Selection now also accepts non-array selections from Symbol and String.
10
+ * Relation#to_hash now accepts any Selection-able `from` and `to` args.
11
+
12
+ # 0.15.0 / 2013-11-01
2
13
 
3
14
  * Compiler infrastructure entirely rewritten in alf-compiler
4
15
  * Changed signature of `Adapter::Connection#cog` and associated `#to_cog`
data/Gemfile CHANGED
@@ -10,7 +10,6 @@ end
10
10
  group :test do
11
11
  gem "rake", "~> 10.1"
12
12
  gem "rspec", "~> 2.14"
13
- gem "ruby_cop", "~> 1.0"
14
13
  end
15
14
 
16
15
  group :release do
@@ -20,4 +19,5 @@ end
20
19
 
21
20
  group :extra do
22
21
  gem "highline", "~> 1.6"
22
+ gem "ruby_cop", "~> 1.0"
23
23
  end
@@ -1,39 +1 @@
1
- require_relative 'alf/core/loader'
2
- require_relative 'alf/core/version'
3
- require_relative 'alf/errors'
4
- require_relative 'alf/ext'
5
- require_relative 'alf/facade'
6
-
7
- module Alf
8
- TupleLike = lambda{|t| t.is_a?(Hash) || t.is_a?(Tuple) }
9
- RelationLike = lambda{|r| Relation===r || Engine::Cog===r || Reader===r || Relvar===r }
10
- end
11
-
12
- require_relative 'alf/predicate'
13
- require_relative 'alf/support'
14
- require_relative 'alf/types'
15
- require_relative 'alf/aggregator'
16
- require_relative 'alf/algebra'
17
- require_relative 'alf/compiler'
18
- require_relative "alf/engine"
19
- require_relative 'alf/reader'
20
- require_relative 'alf/renderer'
21
- require_relative 'alf/lang'
22
- require_relative 'alf/relation'
23
- require_relative 'alf/relvar'
24
- require_relative 'alf/optimizer'
25
- require_relative 'alf/update'
26
- require_relative 'alf/adapter'
27
- require_relative 'alf/viewpoint'
28
- require_relative 'alf/database'
29
- require_relative 'alf/adapter/fs'
30
-
31
- module Alf
32
- extend Facade
33
-
34
- DUM = Relation::DUM
35
- DEE = Relation::DEE
36
- end
37
-
38
- require_relative 'alf/dsl'
39
- include Alf::Dsl unless defined?(ALF_NO_CORE_EXTENSIONS)
1
+ require_relative "alf/core"
@@ -6,7 +6,7 @@ module Alf
6
6
  signature do |s|
7
7
  s.argument :id, AttrList, [:id]
8
8
  s.argument :parent, AttrList, [:parent]
9
- s.argument :as, AttrName, [:children]
9
+ s.argument :as, AttrName, :children
10
10
  end
11
11
 
12
12
  def heading
@@ -11,8 +11,11 @@ module Alf
11
11
 
12
12
  def heading
13
13
  @heading ||= begin
14
- op_h = operand.heading
15
- op_h.allbut([attribute]).merge(op_h[attribute].heading)
14
+ op_h = operand.heading
15
+ type = op_h[attribute]
16
+ raise NotSupportedError unless type.respond_to?(:heading)
17
+ down_h = type.heading
18
+ op_h.allbut([attribute]).merge(down_h)
16
19
  end
17
20
  end
18
21
 
@@ -38,3 +38,4 @@ module Alf
38
38
  end # module Algebra
39
39
  end # module Alf
40
40
  require_relative 'shortcut/allbut'
41
+ require_relative 'shortcut/image'
@@ -0,0 +1,33 @@
1
+ module Alf
2
+ module Algebra
3
+ class Image
4
+ include Shortcut
5
+ include Binary
6
+
7
+ signature do |s|
8
+ s.argument :name, AttrName, []
9
+ end
10
+
11
+ def keys
12
+ left.keys
13
+ end
14
+
15
+ def expand
16
+ grouped = join(left, group(right, common_attrs, name, allbut: true))
17
+ missing = extend(not_matching(left, right), name => group_type.empty)
18
+ union(grouped, missing)
19
+ end
20
+
21
+ private
22
+
23
+ def common_attrs
24
+ left.attr_list & right.attr_list
25
+ end
26
+
27
+ def group_type
28
+ @group_type ||= Relation[right.heading.allbut(common_attrs)]
29
+ end
30
+
31
+ end # class Image
32
+ end # module Algebra
33
+ end # module Alf
@@ -22,7 +22,7 @@ module Alf
22
22
  end
23
23
 
24
24
  def on_shortcut(plan, expr, *compiled)
25
- plan.recompile(*compiled){|p| expr.expand }
25
+ plan.__compile{|p| expr.expand }
26
26
  end
27
27
 
28
28
  def on_missing(plan, expr, *compiled)
@@ -30,8 +30,15 @@ module Alf
30
30
  Support::Tree.new(self).to_text
31
31
  end
32
32
 
33
+ def relation_type
34
+ @relation_type ||= Relation[heading]
35
+ end
36
+
33
37
  def to_relation
34
- Relation.coerce(each.to_set)
38
+ raise NotSupportedError unless expr
39
+ relation_type.new(each)
40
+ rescue NotSupportedError
41
+ Relation.coerce(each)
35
42
  end
36
43
 
37
44
  end # module Cog
@@ -0,0 +1,39 @@
1
+ require_relative 'core/loader'
2
+ require_relative 'core/version'
3
+ require_relative 'errors'
4
+ require_relative 'ext'
5
+ require_relative 'facade'
6
+
7
+ module Alf
8
+ TupleLike = lambda{|t| t.is_a?(Hash) || t.is_a?(Tuple) }
9
+ RelationLike = lambda{|r| Relation===r || Engine::Cog===r || Reader===r || Relvar===r }
10
+ end
11
+
12
+ require_relative 'predicate'
13
+ require_relative 'support'
14
+ require_relative 'types'
15
+ require_relative 'aggregator'
16
+ require_relative 'algebra'
17
+ require_relative 'compiler'
18
+ require_relative 'engine'
19
+ require_relative 'reader'
20
+ require_relative 'renderer'
21
+ require_relative 'lang'
22
+ require_relative 'relation'
23
+ require_relative 'relvar'
24
+ require_relative 'optimizer'
25
+ require_relative 'update'
26
+ require_relative 'adapter'
27
+ require_relative 'viewpoint'
28
+ require_relative 'database'
29
+ require_relative 'adapter/fs'
30
+
31
+ module Alf
32
+ extend Facade
33
+
34
+ DUM = Relation::DUM
35
+ DEE = Relation::DEE
36
+ end
37
+
38
+ require_relative 'dsl'
39
+ include Alf::Dsl unless defined?(ALF_NO_CORE_EXTENSIONS)
@@ -3,7 +3,7 @@ module Alf
3
3
  module Version
4
4
 
5
5
  MAJOR = 0
6
- MINOR = 15
6
+ MINOR = 16
7
7
  TINY = 0
8
8
 
9
9
  def self.to_s
@@ -41,7 +41,7 @@ module Alf
41
41
  ### logical level
42
42
 
43
43
  def parse(*args, &bl)
44
- parser.parse(*args, &bl)
44
+ Algebra::Operand.coerce parser.parse(*args, &bl)
45
45
  end
46
46
 
47
47
  def optimize(*args, &bl)
@@ -33,7 +33,7 @@ module Alf
33
33
  atr, alb = @attributes, @allbut
34
34
  index = Materialize::Hash.new(operand, atr, !alb, expr)
35
35
  index.each_pair do |k,v|
36
- grouped = Clip.new(v, atr, alb, expr).to_relation
36
+ grouped = Clip.new(v, atr, alb).to_relation
37
37
  yield k.merge(@as => grouped)
38
38
  end
39
39
  end
@@ -16,8 +16,10 @@ module Alf
16
16
  end
17
17
 
18
18
  # (see Cog#each)
19
- def _each(&block)
20
- operand.each(&block)
19
+ def _each
20
+ operand.each do |tuple|
21
+ yield(symbolize(tuple))
22
+ end
21
23
  end
22
24
 
23
25
  def to_s
@@ -21,7 +21,10 @@ module Alf
21
21
  operand.each do |tuple|
22
22
  tuple = tuple.dup
23
23
  tuple = tuple.to_hash unless tuple.is_a?(Hash)
24
- tuple.delete(@attribute).each do |subtuple|
24
+ unless rva = tuple.delete(@attribute)
25
+ raise "No such RVA `#{@attribute}` on #{tuple.inspect}"
26
+ end
27
+ rva.each do |subtuple|
25
28
  subtuple = symbolize(subtuple)
26
29
  yield tuple.merge(subtuple)
27
30
  end
@@ -1 +1,2 @@
1
1
  require_relative 'ext/domain/heading_based'
2
+ require_relative 'ext/yaml'
@@ -54,11 +54,17 @@ module Domain
54
54
  other.to_heading==to_heading
55
55
  }
56
56
  define_method(:coerce){|arg|
57
+ return arg if self==arg.class
57
58
  master_class.coercions.apply(arg, self)
58
59
  }
59
60
  define_method(:to_heading){
60
61
  @heading ||= Alf::Heading.coerce(generating_type)
61
62
  }
63
+ define_method(:to_tuple_type){
64
+ return self if Alf::Tuple==master_class
65
+ return gt if gt.is_a?(Class) && gt < Alf::Tuple
66
+ @tuple_type ||= Alf::Tuple[to_heading]
67
+ }
62
68
  define_method(:recursive?){
63
69
  h = to_heading
64
70
  h.to_attr_list.any?{|a| h[a] == self}
@@ -0,0 +1,35 @@
1
+ module Psych
2
+ module Visitors
3
+ class YAMLTree
4
+
5
+ def visit_Alf_Tuple o
6
+ @emitter.start_mapping(nil, nil, true, Psych::Nodes::Mapping::BLOCK)
7
+ o.to_hash.each do |k,v|
8
+ accept k.to_s
9
+ accept v
10
+ end
11
+ @emitter.end_mapping
12
+ end
13
+
14
+ def visit_Alf_Relation o
15
+ @emitter.start_sequence(nil, nil, true, Nodes::Sequence::BLOCK)
16
+ o.each { |c| accept c }
17
+ @emitter.end_sequence
18
+ end
19
+
20
+ def visit_Alf_Renderer_YAML o
21
+ @emitter.start_sequence(nil, nil, true, Nodes::Sequence::BLOCK)
22
+ o.input.each{|tuple|
23
+ @emitter.start_mapping(nil, nil, true, Psych::Nodes::Mapping::BLOCK)
24
+ tuple.to_hash.each do |k,v|
25
+ accept k.to_s
26
+ accept v
27
+ end
28
+ @emitter.end_mapping
29
+ }
30
+ @emitter.end_sequence
31
+ end
32
+
33
+ end
34
+ end
35
+ end
@@ -35,8 +35,10 @@ module Alf
35
35
  end
36
36
  end
37
37
 
38
- def Tuple(first, *rest, &bl)
39
- if first.respond_to?(:to_tuple) && rest.empty? && bl.nil?
38
+ def Tuple(first = nil, *rest, &bl)
39
+ if first.nil? or (first.is_a?(Hash) && first.empty?)
40
+ Alf::Tuple::EMPTY
41
+ elsif first.respond_to?(:to_tuple) && rest.empty? && bl.nil?
40
42
  return first.to_tuple
41
43
  else
42
44
  tuple = Alf::Tuple.coerce(*rest.unshift(first))
@@ -27,6 +27,11 @@ module Alf
27
27
  end
28
28
  end
29
29
 
30
+ # Register .rash files for Relation loading
31
+ Path.register_loader('.rash'){|file|
32
+ Alf::Reader::Rash.new(file).to_a
33
+ }
34
+
30
35
  Reader.register(:rash, [".rash"], self)
31
36
  end # class Rash
32
37
  end # class Reader
@@ -24,7 +24,8 @@ module Alf
24
24
  include Lang::ObjectOriented
25
25
 
26
26
  def initialize(tuples)
27
- super(tuples.map{|x| Tuple.coerce(x)}.to_set)
27
+ tuple_type = self.class.to_tuple_type
28
+ super(tuples.map{|x| tuple_type.coerce(x) }.to_set)
28
29
  end
29
30
 
30
31
  coercions do |c|
@@ -42,8 +43,7 @@ module Alf
42
43
  end
43
44
  c.coercion(Enumerable) do |v,rt|
44
45
  rt = Relation[Engine::InferHeading.new(v).first] if Relation==rt
45
- tt = rt.generating_type.is_a?(Class) ? rt.generating_type : Tuple[rt.heading]
46
- rt.new(v.map{|t| tt.coerce(t) }.to_set).check_internal_representation!
46
+ rt.new(v).check_internal_representation!
47
47
  end
48
48
  end
49
49
 
@@ -110,11 +110,12 @@ module Alf
110
110
 
111
111
  def to_hash(from, to=nil)
112
112
  if from.is_a?(Hash) and to.nil?
113
- raise ArgumentError "Hash of size 1 expected. " unless from.size==1
113
+ raise ArgumentError "Hash of size 1 expected." unless from.size==1
114
114
  to_hash(from.keys.first, from.values.first)
115
115
  else
116
+ from, to = Selection.coerce(from), Selection.coerce(to)
116
117
  each.each_with_object({}) do |tuple, hash|
117
- key, value = tuple[from], tuple[to]
118
+ key, value = from.select(tuple), to.select(tuple)
118
119
  if hash.has_key?(key) and hash[key] != value
119
120
  raise "Key expected for `#{from}`, divergence found on `#{key}`"
120
121
  else
@@ -77,9 +77,7 @@ module Alf
77
77
  end
78
78
 
79
79
  def to_relation
80
- type.new(to_cog.to_set)
81
- rescue NotSupportedError
82
- Relation.coerce(to_cog.each.to_a)
80
+ to_cog.to_relation
83
81
  end
84
82
 
85
83
  private
@@ -11,7 +11,7 @@ module Alf
11
11
  end
12
12
 
13
13
  def to_relation
14
- expr.subject
14
+ Relation.coerce(expr.subject)
15
15
  end
16
16
 
17
17
  ### Update
@@ -128,8 +128,7 @@ module Alf
128
128
  end
129
129
 
130
130
  def each_line(pretty = options[:pretty])
131
- if pretty
132
- trim = options[:trim_at]
131
+ if pretty && trim = options[:trim_at]
133
132
  each_line(false) do |line|
134
133
  yield(line[0..trim])
135
134
  end
@@ -9,6 +9,13 @@ module Alf
9
9
  "text/yaml"
10
10
  end
11
11
 
12
+ def execute(output = $stdout)
13
+ require "psych"
14
+ visitor = Psych::Visitors::YAMLTree.new
15
+ visitor << self
16
+ output << visitor.tree.to_yaml
17
+ end
18
+
12
19
  def each
13
20
  return to_enum unless block_given?
14
21
  require "yaml"
@@ -56,5 +56,14 @@ module Alf
56
56
  tuple.each_with_object({}){|(k,v),h| h[k.to_s] = v}
57
57
  end
58
58
 
59
+ # Compare `x` and `y` in a robust way, that is, by handling `nil` without
60
+ # failure.
61
+ def robust_compare(x, y)
62
+ return 0 if x==y
63
+ return -1 if x.nil?
64
+ return 1 if y.nil?
65
+ x.respond_to?(:<=>) ? (x <=> y) : (x.to_s <=> y.to_s)
66
+ end
67
+
59
68
  end # module Support
60
69
  end # module Alf