laser 0.7.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (319) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +14 -0
  4. data/LICENSE +661 -0
  5. data/README.md +158 -0
  6. data/Rakefile +104 -0
  7. data/VERSION +1 -0
  8. data/bin/laser +7 -0
  9. data/design_docs/goals.md +57 -0
  10. data/design_docs/object_regex.md +426 -0
  11. data/design_docs/type_annotations.md +80 -0
  12. data/ext/laser/BasicBlock.cpp +572 -0
  13. data/ext/laser/BasicBlock.h +118 -0
  14. data/ext/laser/extconf.rb +3 -0
  15. data/features/laser.feature +25 -0
  16. data/features/step_definitions/laser_steps.rb +39 -0
  17. data/features/support/env.rb +14 -0
  18. data/features/support/testdata/1_input +1 -0
  19. data/features/support/testdata/1_output +1 -0
  20. data/features/support/testdata/2_input +4 -0
  21. data/features/support/testdata/2_output +4 -0
  22. data/features/support/testdata/3_input +8 -0
  23. data/features/support/testdata/3_output +11 -0
  24. data/features/support/testdata/4_input +5 -0
  25. data/features/support/testdata/4_output +5 -0
  26. data/features/support/testdata/5_input +13 -0
  27. data/laser.gemspec +382 -0
  28. data/lib/laser.rb +98 -0
  29. data/lib/laser/analysis/annotations.rb +95 -0
  30. data/lib/laser/analysis/annotations/annotation_config.yaml +3 -0
  31. data/lib/laser/analysis/annotations/comment_attachment_annotation.rb +66 -0
  32. data/lib/laser/analysis/annotations/node_pointers_annotation.rb +36 -0
  33. data/lib/laser/analysis/annotations/runtime_annotation.rb +55 -0
  34. data/lib/laser/analysis/argument_expansion.rb +132 -0
  35. data/lib/laser/analysis/arity.rb +34 -0
  36. data/lib/laser/analysis/bindings.rb +144 -0
  37. data/lib/laser/analysis/bootstrap/bootstrap.rb +298 -0
  38. data/lib/laser/analysis/bootstrap/laser_class.rb +106 -0
  39. data/lib/laser/analysis/bootstrap/laser_method.rb +255 -0
  40. data/lib/laser/analysis/bootstrap/laser_module.rb +403 -0
  41. data/lib/laser/analysis/bootstrap/laser_module_copy.rb +74 -0
  42. data/lib/laser/analysis/bootstrap/laser_object.rb +69 -0
  43. data/lib/laser/analysis/bootstrap/laser_proc.rb +150 -0
  44. data/lib/laser/analysis/bootstrap/laser_singleton_class.rb +44 -0
  45. data/lib/laser/analysis/comments.rb +35 -0
  46. data/lib/laser/analysis/control_flow.rb +28 -0
  47. data/lib/laser/analysis/control_flow/alias_analysis.rb +31 -0
  48. data/lib/laser/analysis/control_flow/basic_block.rb +105 -0
  49. data/lib/laser/analysis/control_flow/cfg_builder.rb +2505 -0
  50. data/lib/laser/analysis/control_flow/cfg_instruction.rb +190 -0
  51. data/lib/laser/analysis/control_flow/constant_propagation.rb +742 -0
  52. data/lib/laser/analysis/control_flow/control_flow_graph.rb +370 -0
  53. data/lib/laser/analysis/control_flow/lifetime_analysis.rb +91 -0
  54. data/lib/laser/analysis/control_flow/method_call_search.rb +26 -0
  55. data/lib/laser/analysis/control_flow/raise_properties.rb +25 -0
  56. data/lib/laser/analysis/control_flow/simulation.rb +385 -0
  57. data/lib/laser/analysis/control_flow/static_single_assignment.rb +185 -0
  58. data/lib/laser/analysis/control_flow/unreachability_analysis.rb +57 -0
  59. data/lib/laser/analysis/control_flow/unused_variables.rb +91 -0
  60. data/lib/laser/analysis/control_flow/yield_properties.rb +103 -0
  61. data/lib/laser/analysis/errors.rb +131 -0
  62. data/lib/laser/analysis/laser_utils.rb +18 -0
  63. data/lib/laser/analysis/lexical_analysis.rb +172 -0
  64. data/lib/laser/analysis/method_call.rb +68 -0
  65. data/lib/laser/analysis/protocol_registry.rb +30 -0
  66. data/lib/laser/analysis/scope.rb +118 -0
  67. data/lib/laser/analysis/sexp.rb +159 -0
  68. data/lib/laser/analysis/sexp_analysis.rb +40 -0
  69. data/lib/laser/analysis/sexp_extensions/constant_extraction.rb +115 -0
  70. data/lib/laser/analysis/sexp_extensions/source_location.rb +164 -0
  71. data/lib/laser/analysis/sexp_extensions/type_inference.rb +47 -0
  72. data/lib/laser/analysis/signature.rb +76 -0
  73. data/lib/laser/analysis/special_methods/send.rb +67 -0
  74. data/lib/laser/analysis/unused_methods.rb +21 -0
  75. data/lib/laser/analysis/visitor.rb +141 -0
  76. data/lib/laser/annotation_parser/annotations.treetop +126 -0
  77. data/lib/laser/annotation_parser/annotations_parser.rb +748 -0
  78. data/lib/laser/annotation_parser/class_annotations.treetop +82 -0
  79. data/lib/laser/annotation_parser/class_annotations_parser.rb +654 -0
  80. data/lib/laser/annotation_parser/overload.treetop +24 -0
  81. data/lib/laser/annotation_parser/overload_parser.rb +167 -0
  82. data/lib/laser/annotation_parser/parsers.rb +6 -0
  83. data/lib/laser/annotation_parser/structural.treetop +37 -0
  84. data/lib/laser/annotation_parser/structural_parser.rb +406 -0
  85. data/lib/laser/annotation_parser/useful_parsers.treetop +47 -0
  86. data/lib/laser/annotation_parser/useful_parsers_parser.rb +674 -0
  87. data/lib/laser/rake/task.rb +46 -0
  88. data/lib/laser/runner.rb +189 -0
  89. data/lib/laser/scanner.rb +169 -0
  90. data/lib/laser/standard_library/_thread.rb +110 -0
  91. data/lib/laser/standard_library/abbrev.rb +103 -0
  92. data/lib/laser/standard_library/array.rb +418 -0
  93. data/lib/laser/standard_library/base64.rb +91 -0
  94. data/lib/laser/standard_library/basic_object.rb +55 -0
  95. data/lib/laser/standard_library/benchmark.rb +556 -0
  96. data/lib/laser/standard_library/bignum.rb +185 -0
  97. data/lib/laser/standard_library/cgi.rb +275 -0
  98. data/lib/laser/standard_library/cgi/cookie.rb +147 -0
  99. data/lib/laser/standard_library/cgi/core.rb +791 -0
  100. data/lib/laser/standard_library/cgi/html.rb +1021 -0
  101. data/lib/laser/standard_library/cgi/session.rb +537 -0
  102. data/lib/laser/standard_library/cgi/session/pstore.rb +111 -0
  103. data/lib/laser/standard_library/cgi/util.rb +188 -0
  104. data/lib/laser/standard_library/class_definitions.rb +333 -0
  105. data/lib/laser/standard_library/comparable.rb +125 -0
  106. data/lib/laser/standard_library/complex.rb +162 -0
  107. data/lib/laser/standard_library/enumerable.rb +178 -0
  108. data/lib/laser/standard_library/exceptions.rb +135 -0
  109. data/lib/laser/standard_library/fixnum.rb +188 -0
  110. data/lib/laser/standard_library/float.rb +180 -0
  111. data/lib/laser/standard_library/hash.rb +237 -0
  112. data/lib/laser/standard_library/integer.rb +123 -0
  113. data/lib/laser/standard_library/laser_magic.rb +7 -0
  114. data/lib/laser/standard_library/nil_false_true.rb +113 -0
  115. data/lib/laser/standard_library/numbers.rb +192 -0
  116. data/lib/laser/standard_library/proc.rb +31 -0
  117. data/lib/laser/standard_library/set.rb +1348 -0
  118. data/lib/laser/standard_library/string.rb +666 -0
  119. data/lib/laser/standard_library/stringio.rb +2 -0
  120. data/lib/laser/standard_library/symbol.rb +125 -0
  121. data/lib/laser/standard_library/tsort.rb +242 -0
  122. data/lib/laser/support/acts_as_struct.rb +66 -0
  123. data/lib/laser/support/frequency.rb +55 -0
  124. data/lib/laser/support/inheritable_attributes.rb +145 -0
  125. data/lib/laser/support/module_extensions.rb +94 -0
  126. data/lib/laser/support/placeholder_object.rb +13 -0
  127. data/lib/laser/third_party/rgl/adjacency.rb +221 -0
  128. data/lib/laser/third_party/rgl/base.rb +228 -0
  129. data/lib/laser/third_party/rgl/bidirectional.rb +39 -0
  130. data/lib/laser/third_party/rgl/condensation.rb +47 -0
  131. data/lib/laser/third_party/rgl/connected_components.rb +138 -0
  132. data/lib/laser/third_party/rgl/control_flow.rb +170 -0
  133. data/lib/laser/third_party/rgl/depth_first_spanning_tree.rb +37 -0
  134. data/lib/laser/third_party/rgl/dominators.rb +124 -0
  135. data/lib/laser/third_party/rgl/dot.rb +93 -0
  136. data/lib/laser/third_party/rgl/graphxml.rb +51 -0
  137. data/lib/laser/third_party/rgl/implicit.rb +174 -0
  138. data/lib/laser/third_party/rgl/mutable.rb +117 -0
  139. data/lib/laser/third_party/rgl/rdot.rb +445 -0
  140. data/lib/laser/third_party/rgl/topsort.rb +72 -0
  141. data/lib/laser/third_party/rgl/transitivity.rb +180 -0
  142. data/lib/laser/third_party/rgl/traversal.rb +348 -0
  143. data/lib/laser/types/types.rb +433 -0
  144. data/lib/laser/version.rb +14 -0
  145. data/lib/laser/warning.rb +149 -0
  146. data/lib/laser/warning_sets/default.yml +13 -0
  147. data/lib/laser/warnings/assignment_in_condition.rb +20 -0
  148. data/lib/laser/warnings/comment_spacing.rb +31 -0
  149. data/lib/laser/warnings/extra_blank_lines.rb +30 -0
  150. data/lib/laser/warnings/extra_whitespace.rb +16 -0
  151. data/lib/laser/warnings/hash_symbol_18_warning.rb +63 -0
  152. data/lib/laser/warnings/hash_symbol_19_warning.rb +29 -0
  153. data/lib/laser/warnings/line_length.rb +115 -0
  154. data/lib/laser/warnings/misaligned_unindentation.rb +17 -0
  155. data/lib/laser/warnings/operator_spacing.rb +68 -0
  156. data/lib/laser/warnings/parens_on_declaration.rb +30 -0
  157. data/lib/laser/warnings/rescue_exception.rb +42 -0
  158. data/lib/laser/warnings/semicolon.rb +25 -0
  159. data/lib/laser/warnings/sexp_errors.rb +24 -0
  160. data/lib/laser/warnings/uncalled_method_warning.rb +7 -0
  161. data/lib/laser/warnings/useless_double_quotes.rb +38 -0
  162. data/spec/analysis_specs/annotations_spec.rb +47 -0
  163. data/spec/analysis_specs/annotations_specs/comment_attachment_spec.rb +68 -0
  164. data/spec/analysis_specs/annotations_specs/node_pointers_annotation_spec.rb +90 -0
  165. data/spec/analysis_specs/annotations_specs/runtime_annotation_spec.rb +135 -0
  166. data/spec/analysis_specs/annotations_specs/spec_helper.rb +33 -0
  167. data/spec/analysis_specs/argument_expansion_spec.rb +113 -0
  168. data/spec/analysis_specs/bindings_spec.rb +36 -0
  169. data/spec/analysis_specs/comment_spec.rb +93 -0
  170. data/spec/analysis_specs/control_flow_specs/cfg_instruction_spec.rb +111 -0
  171. data/spec/analysis_specs/control_flow_specs/constant_propagation_spec.rb +560 -0
  172. data/spec/analysis_specs/control_flow_specs/control_flow_graph_spec.rb +5 -0
  173. data/spec/analysis_specs/control_flow_specs/raise_properties_spec.rb +310 -0
  174. data/spec/analysis_specs/control_flow_specs/raise_type_inference_spec.rb +301 -0
  175. data/spec/analysis_specs/control_flow_specs/return_type_inference_spec.rb +431 -0
  176. data/spec/analysis_specs/control_flow_specs/simulation_spec.rb +158 -0
  177. data/spec/analysis_specs/control_flow_specs/spec_helper.rb +110 -0
  178. data/spec/analysis_specs/control_flow_specs/tuple_misuse_inference_spec.rb +125 -0
  179. data/spec/analysis_specs/control_flow_specs/unreachability_analysis_spec.rb +76 -0
  180. data/spec/analysis_specs/control_flow_specs/unused_variable_spec.rb +99 -0
  181. data/spec/analysis_specs/control_flow_specs/yield_properties_spec.rb +372 -0
  182. data/spec/analysis_specs/error_spec.rb +30 -0
  183. data/spec/analysis_specs/laser_class_spec.rb +322 -0
  184. data/spec/analysis_specs/lexical_analysis_spec.rb +184 -0
  185. data/spec/analysis_specs/protocol_registry_spec.rb +63 -0
  186. data/spec/analysis_specs/scope_annotation_spec.rb +1013 -0
  187. data/spec/analysis_specs/scope_spec.rb +126 -0
  188. data/spec/analysis_specs/sexp_analysis_spec.rb +30 -0
  189. data/spec/analysis_specs/sexp_extension_specs/constant_extraction_spec.rb +309 -0
  190. data/spec/analysis_specs/sexp_extension_specs/source_location_spec.rb +231 -0
  191. data/spec/analysis_specs/sexp_extension_specs/spec_helper.rb +1 -0
  192. data/spec/analysis_specs/sexp_extension_specs/type_inference_spec.rb +252 -0
  193. data/spec/analysis_specs/sexp_spec.rb +167 -0
  194. data/spec/analysis_specs/spec_helper.rb +27 -0
  195. data/spec/analysis_specs/unused_methods_spec.rb +65 -0
  196. data/spec/analysis_specs/visitor_spec.rb +64 -0
  197. data/spec/annotation_parser_specs/annotations_parser_spec.rb +89 -0
  198. data/spec/annotation_parser_specs/class_annotation_parser_spec.rb +120 -0
  199. data/spec/annotation_parser_specs/overload_parser_spec.rb +39 -0
  200. data/spec/annotation_parser_specs/parsers_spec.rb +14 -0
  201. data/spec/annotation_parser_specs/spec_helper.rb +1 -0
  202. data/spec/annotation_parser_specs/structural_parser_spec.rb +67 -0
  203. data/spec/laser_spec.rb +14 -0
  204. data/spec/rake_specs/spec_helper.rb +1 -0
  205. data/spec/rake_specs/task_spec.rb +67 -0
  206. data/spec/runner_spec.rb +207 -0
  207. data/spec/scanner_spec.rb +75 -0
  208. data/spec/spec_helper.rb +121 -0
  209. data/spec/standard_library/exceptions_spec.rb +19 -0
  210. data/spec/standard_library/globals_spec.rb +14 -0
  211. data/spec/standard_library/set_spec.rb +31 -0
  212. data/spec/standard_library/spec_helper.rb +1 -0
  213. data/spec/standard_library/standard_library_spec.rb +302 -0
  214. data/spec/support_specs/acts_as_struct_spec.rb +94 -0
  215. data/spec/support_specs/frequency_spec.rb +23 -0
  216. data/spec/support_specs/module_extensions_spec.rb +117 -0
  217. data/spec/support_specs/spec_helper.rb +1 -0
  218. data/spec/type_specs/spec_helper.rb +1 -0
  219. data/spec/type_specs/types_spec.rb +133 -0
  220. data/spec/warning_spec.rb +95 -0
  221. data/spec/warning_specs/assignment_in_condition_spec.rb +68 -0
  222. data/spec/warning_specs/comment_spacing_spec.rb +65 -0
  223. data/spec/warning_specs/extra_blank_lines_spec.rb +70 -0
  224. data/spec/warning_specs/extra_whitespace_spec.rb +33 -0
  225. data/spec/warning_specs/hash_symbol_18_warning_spec.rb +89 -0
  226. data/spec/warning_specs/hash_symbol_19_warning_spec.rb +63 -0
  227. data/spec/warning_specs/line_length_spec.rb +173 -0
  228. data/spec/warning_specs/misaligned_unindentation_spec.rb +35 -0
  229. data/spec/warning_specs/operator_spacing_spec.rb +104 -0
  230. data/spec/warning_specs/parens_on_declaration_spec.rb +57 -0
  231. data/spec/warning_specs/rescue_exception_spec.rb +105 -0
  232. data/spec/warning_specs/semicolon_spec.rb +58 -0
  233. data/spec/warning_specs/spec_helper.rb +1 -0
  234. data/spec/warning_specs/useless_double_quotes_spec.rb +74 -0
  235. data/status_reports/2010/12/2010-12-14.md +163 -0
  236. data/status_reports/2010/12/2010-12-23.md +298 -0
  237. data/status_reports/2010/12/2010-12-24.md +6 -0
  238. data/test/third_party_tests/rgl_tests/TestComponents.rb +65 -0
  239. data/test/third_party_tests/rgl_tests/TestCycles.rb +61 -0
  240. data/test/third_party_tests/rgl_tests/TestDirectedGraph.rb +125 -0
  241. data/test/third_party_tests/rgl_tests/TestDot.rb +18 -0
  242. data/test/third_party_tests/rgl_tests/TestEdge.rb +34 -0
  243. data/test/third_party_tests/rgl_tests/TestGraph.rb +71 -0
  244. data/test/third_party_tests/rgl_tests/TestGraphXML.rb +57 -0
  245. data/test/third_party_tests/rgl_tests/TestImplicit.rb +52 -0
  246. data/test/third_party_tests/rgl_tests/TestRdot.rb +863 -0
  247. data/test/third_party_tests/rgl_tests/TestTransitivity.rb +129 -0
  248. data/test/third_party_tests/rgl_tests/TestTraversal.rb +220 -0
  249. data/test/third_party_tests/rgl_tests/TestUnDirectedGraph.rb +102 -0
  250. data/test/third_party_tests/rgl_tests/examples/north/Graph.log +128 -0
  251. data/test/third_party_tests/rgl_tests/examples/north/g.10.0.graphml +28 -0
  252. data/test/third_party_tests/rgl_tests/examples/north/g.10.1.graphml +28 -0
  253. data/test/third_party_tests/rgl_tests/examples/north/g.10.11.graphml +31 -0
  254. data/test/third_party_tests/rgl_tests/examples/north/g.10.12.graphml +27 -0
  255. data/test/third_party_tests/rgl_tests/examples/north/g.10.13.graphml +27 -0
  256. data/test/third_party_tests/rgl_tests/examples/north/g.10.14.graphml +27 -0
  257. data/test/third_party_tests/rgl_tests/examples/north/g.10.15.graphml +26 -0
  258. data/test/third_party_tests/rgl_tests/examples/north/g.10.16.graphml +26 -0
  259. data/test/third_party_tests/rgl_tests/examples/north/g.10.17.graphml +26 -0
  260. data/test/third_party_tests/rgl_tests/examples/north/g.10.19.graphml +37 -0
  261. data/test/third_party_tests/rgl_tests/examples/north/g.10.2.graphml +28 -0
  262. data/test/third_party_tests/rgl_tests/examples/north/g.10.20.graphml +38 -0
  263. data/test/third_party_tests/rgl_tests/examples/north/g.10.22.graphml +43 -0
  264. data/test/third_party_tests/rgl_tests/examples/north/g.10.24.graphml +30 -0
  265. data/test/third_party_tests/rgl_tests/examples/north/g.10.25.graphml +45 -0
  266. data/test/third_party_tests/rgl_tests/examples/north/g.10.27.graphml +38 -0
  267. data/test/third_party_tests/rgl_tests/examples/north/g.10.28.graphml +30 -0
  268. data/test/third_party_tests/rgl_tests/examples/north/g.10.29.graphml +38 -0
  269. data/test/third_party_tests/rgl_tests/examples/north/g.10.3.graphml +26 -0
  270. data/test/third_party_tests/rgl_tests/examples/north/g.10.30.graphml +34 -0
  271. data/test/third_party_tests/rgl_tests/examples/north/g.10.31.graphml +42 -0
  272. data/test/third_party_tests/rgl_tests/examples/north/g.10.34.graphml +42 -0
  273. data/test/third_party_tests/rgl_tests/examples/north/g.10.37.graphml +28 -0
  274. data/test/third_party_tests/rgl_tests/examples/north/g.10.38.graphml +38 -0
  275. data/test/third_party_tests/rgl_tests/examples/north/g.10.39.graphml +36 -0
  276. data/test/third_party_tests/rgl_tests/examples/north/g.10.4.graphml +26 -0
  277. data/test/third_party_tests/rgl_tests/examples/north/g.10.40.graphml +37 -0
  278. data/test/third_party_tests/rgl_tests/examples/north/g.10.41.graphml +37 -0
  279. data/test/third_party_tests/rgl_tests/examples/north/g.10.42.graphml +26 -0
  280. data/test/third_party_tests/rgl_tests/examples/north/g.10.45.graphml +28 -0
  281. data/test/third_party_tests/rgl_tests/examples/north/g.10.46.graphml +32 -0
  282. data/test/third_party_tests/rgl_tests/examples/north/g.10.5.graphml +31 -0
  283. data/test/third_party_tests/rgl_tests/examples/north/g.10.50.graphml +30 -0
  284. data/test/third_party_tests/rgl_tests/examples/north/g.10.56.graphml +29 -0
  285. data/test/third_party_tests/rgl_tests/examples/north/g.10.57.graphml +32 -0
  286. data/test/third_party_tests/rgl_tests/examples/north/g.10.58.graphml +32 -0
  287. data/test/third_party_tests/rgl_tests/examples/north/g.10.6.graphml +26 -0
  288. data/test/third_party_tests/rgl_tests/examples/north/g.10.60.graphml +32 -0
  289. data/test/third_party_tests/rgl_tests/examples/north/g.10.61.graphml +34 -0
  290. data/test/third_party_tests/rgl_tests/examples/north/g.10.62.graphml +34 -0
  291. data/test/third_party_tests/rgl_tests/examples/north/g.10.68.graphml +30 -0
  292. data/test/third_party_tests/rgl_tests/examples/north/g.10.69.graphml +32 -0
  293. data/test/third_party_tests/rgl_tests/examples/north/g.10.7.graphml +29 -0
  294. data/test/third_party_tests/rgl_tests/examples/north/g.10.70.graphml +26 -0
  295. data/test/third_party_tests/rgl_tests/examples/north/g.10.71.graphml +27 -0
  296. data/test/third_party_tests/rgl_tests/examples/north/g.10.72.graphml +28 -0
  297. data/test/third_party_tests/rgl_tests/examples/north/g.10.74.graphml +29 -0
  298. data/test/third_party_tests/rgl_tests/examples/north/g.10.75.graphml +29 -0
  299. data/test/third_party_tests/rgl_tests/examples/north/g.10.78.graphml +27 -0
  300. data/test/third_party_tests/rgl_tests/examples/north/g.10.79.graphml +34 -0
  301. data/test/third_party_tests/rgl_tests/examples/north/g.10.8.graphml +29 -0
  302. data/test/third_party_tests/rgl_tests/examples/north/g.10.80.graphml +34 -0
  303. data/test/third_party_tests/rgl_tests/examples/north/g.10.82.graphml +35 -0
  304. data/test/third_party_tests/rgl_tests/examples/north/g.10.83.graphml +32 -0
  305. data/test/third_party_tests/rgl_tests/examples/north/g.10.85.graphml +34 -0
  306. data/test/third_party_tests/rgl_tests/examples/north/g.10.86.graphml +34 -0
  307. data/test/third_party_tests/rgl_tests/examples/north/g.10.88.graphml +37 -0
  308. data/test/third_party_tests/rgl_tests/examples/north/g.10.89.graphml +29 -0
  309. data/test/third_party_tests/rgl_tests/examples/north/g.10.9.graphml +26 -0
  310. data/test/third_party_tests/rgl_tests/examples/north/g.10.90.graphml +32 -0
  311. data/test/third_party_tests/rgl_tests/examples/north/g.10.91.graphml +31 -0
  312. data/test/third_party_tests/rgl_tests/examples/north/g.10.92.graphml +26 -0
  313. data/test/third_party_tests/rgl_tests/examples/north/g.10.93.graphml +32 -0
  314. data/test/third_party_tests/rgl_tests/examples/north/g.10.94.graphml +34 -0
  315. data/test/third_party_tests/rgl_tests/examples/north/g.12.8.graphml +40 -0
  316. data/test/third_party_tests/rgl_tests/examples/north/g.14.9.graphml +36 -0
  317. data/test/third_party_tests/rgl_tests/test_helper.rb +7 -0
  318. data/test/third_party_tests/test_inheritable_attributes.rb +187 -0
  319. metadata +470 -0
@@ -0,0 +1,118 @@
1
+ #ifndef LASER_BASIC_BLOCK_H_
2
+ #define LASER_BASIC_BLOCK_H_
3
+
4
+ #include <vector>
5
+ #include <exception>
6
+ #include <stdexcept>
7
+ #include "ruby.h"
8
+
9
+ namespace Laser {
10
+ enum edge_flag {
11
+ EDGE_NORMAL = 1 << 0,
12
+ EDGE_ABNORMAL = 1 << 1,
13
+ EDGE_FAKE = 1 << 2,
14
+ EDGE_EXECUTABLE = 1 << 3,
15
+ EDGE_BLOCK_TAKEN = 1 << 4,
16
+ };
17
+ enum cache_flag {
18
+ EDGE_ALL_SUCC = 1 << 0,
19
+ EDGE_REAL_SUCC = 1 << 1,
20
+ EDGE_ALL_PRED = 1 << 2,
21
+ EDGE_REAL_PRED = 1 << 3,
22
+ };
23
+ class BasicBlock {
24
+ public:
25
+ struct Edge;
26
+ BasicBlock() : _name(NULL), _instructions(rb_ary_new()), _post_order_number(NULL), _cache_flags(0) {}
27
+ BasicBlock(BasicBlock& other);
28
+ // Joins the block as a source to a destination
29
+ void join(BasicBlock* other);
30
+ // Disconnects the block as the source in an edge
31
+ void disconnect(BasicBlock* other);
32
+ // Adds a block on the given edge
33
+ void insert_block_on_edge(BasicBlock* successor, BasicBlock* inserted);
34
+ void clear_edges();
35
+
36
+ inline VALUE name() { return _name; }
37
+ inline void set_name(VALUE name) { _name = name; }
38
+ inline VALUE instructions() { return _instructions; }
39
+ inline void set_instructions(VALUE instructions) { _instructions = instructions; }
40
+ inline VALUE post_order_number() { return _post_order_number; }
41
+ inline void set_post_order_number(VALUE post_order_number) { _post_order_number = post_order_number; }
42
+ inline VALUE representation() { return _representation; }
43
+ inline void set_representation(VALUE representation) { _representation = representation; }
44
+ inline std::vector<Edge*>& predecessors() { return _incoming; }
45
+ inline std::vector<Edge*>& successors() { return _outgoing; }
46
+
47
+ uint8_t get_flags(BasicBlock *dest);
48
+ bool has_flag(BasicBlock* dest, uint8_t flag);
49
+ void add_flag(BasicBlock* dest, uint8_t flag);
50
+ void set_flag(BasicBlock* dest, uint8_t flag);
51
+ void remove_flag(BasicBlock* dest, uint8_t flag);
52
+
53
+ void mark();
54
+
55
+ inline uint8_t cache_flags() { return _cache_flags; }
56
+ inline void clear_cache() { _cache_flags = 0; }
57
+ inline VALUE cached_successors() {
58
+ return (_cache_flags & EDGE_ALL_SUCC) ? _cached_successors : Qnil;
59
+ }
60
+ inline void set_cached_successors(VALUE cached_successors) {
61
+ _cached_successors = cached_successors;
62
+ _cache_flags |= EDGE_ALL_SUCC;
63
+ }
64
+ inline VALUE cached_real_successors() {
65
+ return (_cache_flags & EDGE_REAL_SUCC) ? _cached_real_successors : Qnil;
66
+ }
67
+ inline void set_cached_real_successors(VALUE cached_real_successors) {
68
+ _cached_real_successors = cached_real_successors;
69
+ _cache_flags |= EDGE_REAL_SUCC;
70
+ }
71
+ inline VALUE cached_predecessors() {
72
+ return (_cache_flags & EDGE_ALL_PRED) ? _cached_predecessors : Qnil;
73
+ }
74
+ inline void set_cached_predecessors(VALUE cached_predecessors) {
75
+ _cached_predecessors = cached_predecessors;
76
+ _cache_flags |= EDGE_ALL_PRED;
77
+ }
78
+ inline VALUE cached_real_predecessors() {
79
+ return (_cache_flags & EDGE_REAL_PRED) ? _cached_real_predecessors : Qnil;
80
+ }
81
+ inline void set_cached_real_predecessors(VALUE cached_real_predecessors) {
82
+ _cached_real_predecessors = cached_real_predecessors;
83
+ _cache_flags |= EDGE_REAL_PRED;
84
+ }
85
+
86
+ struct Edge {
87
+ Edge(BasicBlock * const inFrom, BasicBlock * const inTo) : from(inFrom), to(inTo) {}
88
+
89
+ BasicBlock * const from;
90
+ BasicBlock * const to;
91
+ uint8_t flags;
92
+ };
93
+ class NoSuchEdgeException : public std::logic_error {
94
+ public:
95
+ NoSuchEdgeException() : std::logic_error("No such edge exists between the specified block.") {}
96
+ };
97
+ private:
98
+ Edge& edge_to(BasicBlock* dest);
99
+
100
+ std::vector<Edge*> _incoming;
101
+ std::vector<Edge*> _outgoing;
102
+ VALUE _name;
103
+ VALUE _instructions;
104
+ VALUE _post_order_number;
105
+ VALUE _representation;
106
+
107
+ uint8_t _cache_flags;
108
+ VALUE _cached_successors;
109
+ VALUE _cached_real_successors;
110
+ VALUE _cached_predecessors;
111
+ VALUE _cached_real_predecessors;
112
+ };
113
+ }
114
+ extern "C" {
115
+ static void bb_mark(void*);
116
+ }
117
+
118
+ #endif
@@ -0,0 +1,3 @@
1
+ require 'mkmf'
2
+ have_library('stdc++')
3
+ create_makefile('laser/BasicBlock')
@@ -0,0 +1,25 @@
1
+ Feature: Find Warnings
2
+ In order to clean code
3
+ A user should be able to
4
+ scan for warnings
5
+
6
+ Scenario: Scan Single File
7
+ Given the following inputs and outputs:
8
+ | input | output |
9
+ | 1_input | 1 |
10
+ | 2_input | 4 |
11
+ | 3_input | 6 |
12
+ | 4_input | 3 |
13
+ | 5_input | 4 |
14
+ When I scan for warnings
15
+ Then the input and output tables should match
16
+
17
+ Scenario: Scan-n-fix Single File
18
+ Given the following inputs and outputs:
19
+ | input | output |
20
+ | 1_input | 1_output |
21
+ | 2_input | 2_output |
22
+ | 3_input | 3_output |
23
+ | 4_input | 4_output |
24
+ When I scan-and-fix warnings
25
+ Then the input and output tables should match
@@ -0,0 +1,39 @@
1
+ TESTDATA_DIR = File.join(File.dirname(__FILE__), '..', 'support', 'testdata')
2
+
3
+ Given(/the following inputs and outputs:/) do |table|
4
+ @table = table
5
+ end
6
+
7
+ When(/I scan for warnings/) do
8
+ @result_table = [ ['input', 'output'] ]
9
+ swizzling_io do
10
+ @table.hashes.each do |hash|
11
+ full_path = File.join(TESTDATA_DIR, hash[:input])
12
+ runner = Laser::Scanner.new({})
13
+ warnings = runner.scan(File.read(full_path), hash[:input])
14
+ @result_table << [hash[:input], warnings.size.to_s]
15
+ end
16
+ end
17
+ end
18
+
19
+ Then(/the input and output tables should match/) do
20
+ @table.diff!(@result_table)
21
+ end
22
+
23
+ When(/I scan-and-fix warnings/) do
24
+ @result_table = [ ['input', 'output'] ]
25
+ swizzling_io do
26
+ @table.hashes.each do |hash|
27
+ full_path = File.join(TESTDATA_DIR, hash[:input])
28
+ expected_output = File.read(File.join(TESTDATA_DIR, hash[:output]))
29
+ captured_output = StringIO.new
30
+ Laser::LineLengthMaximum(80)
31
+ runner = Laser::Scanner.new(fix: true, output_file: captured_output)
32
+ runner.scan(File.read(full_path), hash[:input])
33
+ reported_output = hash[:output]
34
+ reported_output += '+' if captured_output.string != expected_output
35
+ STDERR.puts [captured_output.string, expected_output].inspect if captured_output.string != expected_output
36
+ @result_table << [hash[:input], reported_output]
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,14 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
+ require 'laser'
3
+
4
+ require 'rspec/expectations'
5
+ require 'stringio'
6
+
7
+ def swizzling_io
8
+ old_stdout, $stdout = $stdout, StringIO.new
9
+ yield
10
+ $stdout.string
11
+ ensure
12
+ $stdout = old_stdout
13
+ end
14
+
@@ -0,0 +1 @@
1
+ a +b
@@ -0,0 +1 @@
1
+ a + b
@@ -0,0 +1,4 @@
1
+ def plus(a, b)
2
+ a+ b
3
+ b + a
4
+ end
@@ -0,0 +1,4 @@
1
+ def plus(a, b)
2
+ a + b
3
+ b + a
4
+ end
@@ -0,0 +1,8 @@
1
+ def plus(a, b)
2
+ a+ b
3
+ raise StandardError.new('a horrible thing happened and now we stopped') if x > 10 unless y
4
+ if some_test
5
+ do_something
6
+ end
7
+ end
8
+
@@ -0,0 +1,11 @@
1
+ def plus(a, b)
2
+ a + b
3
+ unless y
4
+ if x > 10
5
+ raise StandardError.new('a horrible thing happened and now we stopped')
6
+ end
7
+ end
8
+ if some_test
9
+ do_something
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class SomeBigClass
2
+ attr_accessor :silly, :monkey
3
+
4
+ def xyz; 'xyz'; end # laser: ignore SemicolonWarning
5
+ end # laser: ignore MisalignedUnindentationWarning
@@ -0,0 +1,5 @@
1
+ class SomeBigClass
2
+ attr_accessor :silly, :monkey
3
+
4
+ def xyz; 'xyz'; end # laser: ignore SemicolonWarning
5
+ end # laser: ignore MisalignedUnindentationWarning
@@ -0,0 +1,13 @@
1
+ module A
2
+ class B
3
+ def silly args
4
+ begin
5
+ if x = 10
6
+ p args
7
+ end
8
+ rescue Exception => err
9
+ p "err"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,382 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{laser}
8
+ s.version = "0.7.0.pre1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
+ s.authors = [%q{Michael Edgar}]
12
+ s.date = %q{2011-08-12}
13
+ s.description = %q{Laser is an advanced static analysis tool for Ruby.}
14
+ s.email = %q{michael.j.edgar@dartmouth.edu}
15
+ s.executables = [%q{laser}]
16
+ s.extensions = [%q{ext/laser/extconf.rb}]
17
+ s.extra_rdoc_files = [
18
+ "LICENSE",
19
+ "README.md"
20
+ ]
21
+ s.files = [
22
+ ".document",
23
+ ".rspec",
24
+ "Gemfile",
25
+ "LICENSE",
26
+ "README.md",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "bin/laser",
30
+ "design_docs/goals.md",
31
+ "design_docs/object_regex.md",
32
+ "design_docs/type_annotations.md",
33
+ "ext/laser/BasicBlock.cpp",
34
+ "ext/laser/BasicBlock.h",
35
+ "ext/laser/extconf.rb",
36
+ "features/laser.feature",
37
+ "features/step_definitions/laser_steps.rb",
38
+ "features/support/env.rb",
39
+ "features/support/testdata/1_input",
40
+ "features/support/testdata/1_output",
41
+ "features/support/testdata/2_input",
42
+ "features/support/testdata/2_output",
43
+ "features/support/testdata/3_input",
44
+ "features/support/testdata/3_output",
45
+ "features/support/testdata/4_input",
46
+ "features/support/testdata/4_output",
47
+ "features/support/testdata/5_input",
48
+ "laser.gemspec",
49
+ "lib/laser.rb",
50
+ "lib/laser/analysis/annotations.rb",
51
+ "lib/laser/analysis/annotations/annotation_config.yaml",
52
+ "lib/laser/analysis/annotations/comment_attachment_annotation.rb",
53
+ "lib/laser/analysis/annotations/node_pointers_annotation.rb",
54
+ "lib/laser/analysis/annotations/runtime_annotation.rb",
55
+ "lib/laser/analysis/argument_expansion.rb",
56
+ "lib/laser/analysis/arity.rb",
57
+ "lib/laser/analysis/bindings.rb",
58
+ "lib/laser/analysis/bootstrap/bootstrap.rb",
59
+ "lib/laser/analysis/bootstrap/laser_class.rb",
60
+ "lib/laser/analysis/bootstrap/laser_method.rb",
61
+ "lib/laser/analysis/bootstrap/laser_module.rb",
62
+ "lib/laser/analysis/bootstrap/laser_module_copy.rb",
63
+ "lib/laser/analysis/bootstrap/laser_object.rb",
64
+ "lib/laser/analysis/bootstrap/laser_proc.rb",
65
+ "lib/laser/analysis/bootstrap/laser_singleton_class.rb",
66
+ "lib/laser/analysis/comments.rb",
67
+ "lib/laser/analysis/control_flow.rb",
68
+ "lib/laser/analysis/control_flow/alias_analysis.rb",
69
+ "lib/laser/analysis/control_flow/basic_block.rb",
70
+ "lib/laser/analysis/control_flow/cfg_builder.rb",
71
+ "lib/laser/analysis/control_flow/cfg_instruction.rb",
72
+ "lib/laser/analysis/control_flow/constant_propagation.rb",
73
+ "lib/laser/analysis/control_flow/control_flow_graph.rb",
74
+ "lib/laser/analysis/control_flow/lifetime_analysis.rb",
75
+ "lib/laser/analysis/control_flow/method_call_search.rb",
76
+ "lib/laser/analysis/control_flow/raise_properties.rb",
77
+ "lib/laser/analysis/control_flow/simulation.rb",
78
+ "lib/laser/analysis/control_flow/static_single_assignment.rb",
79
+ "lib/laser/analysis/control_flow/unreachability_analysis.rb",
80
+ "lib/laser/analysis/control_flow/unused_variables.rb",
81
+ "lib/laser/analysis/control_flow/yield_properties.rb",
82
+ "lib/laser/analysis/errors.rb",
83
+ "lib/laser/analysis/laser_utils.rb",
84
+ "lib/laser/analysis/lexical_analysis.rb",
85
+ "lib/laser/analysis/method_call.rb",
86
+ "lib/laser/analysis/protocol_registry.rb",
87
+ "lib/laser/analysis/scope.rb",
88
+ "lib/laser/analysis/sexp.rb",
89
+ "lib/laser/analysis/sexp_analysis.rb",
90
+ "lib/laser/analysis/sexp_extensions/constant_extraction.rb",
91
+ "lib/laser/analysis/sexp_extensions/source_location.rb",
92
+ "lib/laser/analysis/sexp_extensions/type_inference.rb",
93
+ "lib/laser/analysis/signature.rb",
94
+ "lib/laser/analysis/special_methods/send.rb",
95
+ "lib/laser/analysis/unused_methods.rb",
96
+ "lib/laser/analysis/visitor.rb",
97
+ "lib/laser/annotation_parser/annotations.treetop",
98
+ "lib/laser/annotation_parser/annotations_parser.rb",
99
+ "lib/laser/annotation_parser/class_annotations.treetop",
100
+ "lib/laser/annotation_parser/class_annotations_parser.rb",
101
+ "lib/laser/annotation_parser/overload.treetop",
102
+ "lib/laser/annotation_parser/overload_parser.rb",
103
+ "lib/laser/annotation_parser/parsers.rb",
104
+ "lib/laser/annotation_parser/structural.treetop",
105
+ "lib/laser/annotation_parser/structural_parser.rb",
106
+ "lib/laser/annotation_parser/useful_parsers.treetop",
107
+ "lib/laser/annotation_parser/useful_parsers_parser.rb",
108
+ "lib/laser/rake/task.rb",
109
+ "lib/laser/runner.rb",
110
+ "lib/laser/scanner.rb",
111
+ "lib/laser/standard_library/_thread.rb",
112
+ "lib/laser/standard_library/abbrev.rb",
113
+ "lib/laser/standard_library/array.rb",
114
+ "lib/laser/standard_library/base64.rb",
115
+ "lib/laser/standard_library/basic_object.rb",
116
+ "lib/laser/standard_library/benchmark.rb",
117
+ "lib/laser/standard_library/bignum.rb",
118
+ "lib/laser/standard_library/cgi.rb",
119
+ "lib/laser/standard_library/cgi/cookie.rb",
120
+ "lib/laser/standard_library/cgi/core.rb",
121
+ "lib/laser/standard_library/cgi/html.rb",
122
+ "lib/laser/standard_library/cgi/session.rb",
123
+ "lib/laser/standard_library/cgi/session/pstore.rb",
124
+ "lib/laser/standard_library/cgi/util.rb",
125
+ "lib/laser/standard_library/class_definitions.rb",
126
+ "lib/laser/standard_library/comparable.rb",
127
+ "lib/laser/standard_library/complex.rb",
128
+ "lib/laser/standard_library/enumerable.rb",
129
+ "lib/laser/standard_library/exceptions.rb",
130
+ "lib/laser/standard_library/fixnum.rb",
131
+ "lib/laser/standard_library/float.rb",
132
+ "lib/laser/standard_library/hash.rb",
133
+ "lib/laser/standard_library/integer.rb",
134
+ "lib/laser/standard_library/laser_magic.rb",
135
+ "lib/laser/standard_library/nil_false_true.rb",
136
+ "lib/laser/standard_library/numbers.rb",
137
+ "lib/laser/standard_library/proc.rb",
138
+ "lib/laser/standard_library/set.rb",
139
+ "lib/laser/standard_library/string.rb",
140
+ "lib/laser/standard_library/stringio.rb",
141
+ "lib/laser/standard_library/symbol.rb",
142
+ "lib/laser/standard_library/tsort.rb",
143
+ "lib/laser/support/acts_as_struct.rb",
144
+ "lib/laser/support/frequency.rb",
145
+ "lib/laser/support/inheritable_attributes.rb",
146
+ "lib/laser/support/module_extensions.rb",
147
+ "lib/laser/support/placeholder_object.rb",
148
+ "lib/laser/third_party/rgl/adjacency.rb",
149
+ "lib/laser/third_party/rgl/base.rb",
150
+ "lib/laser/third_party/rgl/bidirectional.rb",
151
+ "lib/laser/third_party/rgl/condensation.rb",
152
+ "lib/laser/third_party/rgl/connected_components.rb",
153
+ "lib/laser/third_party/rgl/control_flow.rb",
154
+ "lib/laser/third_party/rgl/depth_first_spanning_tree.rb",
155
+ "lib/laser/third_party/rgl/dominators.rb",
156
+ "lib/laser/third_party/rgl/dot.rb",
157
+ "lib/laser/third_party/rgl/graphxml.rb",
158
+ "lib/laser/third_party/rgl/implicit.rb",
159
+ "lib/laser/third_party/rgl/mutable.rb",
160
+ "lib/laser/third_party/rgl/rdot.rb",
161
+ "lib/laser/third_party/rgl/topsort.rb",
162
+ "lib/laser/third_party/rgl/transitivity.rb",
163
+ "lib/laser/third_party/rgl/traversal.rb",
164
+ "lib/laser/types/types.rb",
165
+ "lib/laser/version.rb",
166
+ "lib/laser/warning.rb",
167
+ "lib/laser/warning_sets/default.yml",
168
+ "lib/laser/warnings/assignment_in_condition.rb",
169
+ "lib/laser/warnings/comment_spacing.rb",
170
+ "lib/laser/warnings/extra_blank_lines.rb",
171
+ "lib/laser/warnings/extra_whitespace.rb",
172
+ "lib/laser/warnings/hash_symbol_18_warning.rb",
173
+ "lib/laser/warnings/hash_symbol_19_warning.rb",
174
+ "lib/laser/warnings/line_length.rb",
175
+ "lib/laser/warnings/misaligned_unindentation.rb",
176
+ "lib/laser/warnings/operator_spacing.rb",
177
+ "lib/laser/warnings/parens_on_declaration.rb",
178
+ "lib/laser/warnings/rescue_exception.rb",
179
+ "lib/laser/warnings/semicolon.rb",
180
+ "lib/laser/warnings/sexp_errors.rb",
181
+ "lib/laser/warnings/uncalled_method_warning.rb",
182
+ "lib/laser/warnings/useless_double_quotes.rb",
183
+ "spec/analysis_specs/annotations_spec.rb",
184
+ "spec/analysis_specs/annotations_specs/comment_attachment_spec.rb",
185
+ "spec/analysis_specs/annotations_specs/node_pointers_annotation_spec.rb",
186
+ "spec/analysis_specs/annotations_specs/runtime_annotation_spec.rb",
187
+ "spec/analysis_specs/annotations_specs/spec_helper.rb",
188
+ "spec/analysis_specs/argument_expansion_spec.rb",
189
+ "spec/analysis_specs/bindings_spec.rb",
190
+ "spec/analysis_specs/comment_spec.rb",
191
+ "spec/analysis_specs/control_flow_specs/cfg_instruction_spec.rb",
192
+ "spec/analysis_specs/control_flow_specs/constant_propagation_spec.rb",
193
+ "spec/analysis_specs/control_flow_specs/control_flow_graph_spec.rb",
194
+ "spec/analysis_specs/control_flow_specs/raise_properties_spec.rb",
195
+ "spec/analysis_specs/control_flow_specs/raise_type_inference_spec.rb",
196
+ "spec/analysis_specs/control_flow_specs/return_type_inference_spec.rb",
197
+ "spec/analysis_specs/control_flow_specs/simulation_spec.rb",
198
+ "spec/analysis_specs/control_flow_specs/spec_helper.rb",
199
+ "spec/analysis_specs/control_flow_specs/tuple_misuse_inference_spec.rb",
200
+ "spec/analysis_specs/control_flow_specs/unreachability_analysis_spec.rb",
201
+ "spec/analysis_specs/control_flow_specs/unused_variable_spec.rb",
202
+ "spec/analysis_specs/control_flow_specs/yield_properties_spec.rb",
203
+ "spec/analysis_specs/error_spec.rb",
204
+ "spec/analysis_specs/laser_class_spec.rb",
205
+ "spec/analysis_specs/lexical_analysis_spec.rb",
206
+ "spec/analysis_specs/protocol_registry_spec.rb",
207
+ "spec/analysis_specs/scope_annotation_spec.rb",
208
+ "spec/analysis_specs/scope_spec.rb",
209
+ "spec/analysis_specs/sexp_analysis_spec.rb",
210
+ "spec/analysis_specs/sexp_extension_specs/constant_extraction_spec.rb",
211
+ "spec/analysis_specs/sexp_extension_specs/source_location_spec.rb",
212
+ "spec/analysis_specs/sexp_extension_specs/spec_helper.rb",
213
+ "spec/analysis_specs/sexp_extension_specs/type_inference_spec.rb",
214
+ "spec/analysis_specs/sexp_spec.rb",
215
+ "spec/analysis_specs/spec_helper.rb",
216
+ "spec/analysis_specs/unused_methods_spec.rb",
217
+ "spec/analysis_specs/visitor_spec.rb",
218
+ "spec/annotation_parser_specs/annotations_parser_spec.rb",
219
+ "spec/annotation_parser_specs/class_annotation_parser_spec.rb",
220
+ "spec/annotation_parser_specs/overload_parser_spec.rb",
221
+ "spec/annotation_parser_specs/parsers_spec.rb",
222
+ "spec/annotation_parser_specs/spec_helper.rb",
223
+ "spec/annotation_parser_specs/structural_parser_spec.rb",
224
+ "spec/laser_spec.rb",
225
+ "spec/rake_specs/spec_helper.rb",
226
+ "spec/rake_specs/task_spec.rb",
227
+ "spec/runner_spec.rb",
228
+ "spec/scanner_spec.rb",
229
+ "spec/spec_helper.rb",
230
+ "spec/standard_library/exceptions_spec.rb",
231
+ "spec/standard_library/globals_spec.rb",
232
+ "spec/standard_library/set_spec.rb",
233
+ "spec/standard_library/spec_helper.rb",
234
+ "spec/standard_library/standard_library_spec.rb",
235
+ "spec/support_specs/acts_as_struct_spec.rb",
236
+ "spec/support_specs/frequency_spec.rb",
237
+ "spec/support_specs/module_extensions_spec.rb",
238
+ "spec/support_specs/spec_helper.rb",
239
+ "spec/type_specs/spec_helper.rb",
240
+ "spec/type_specs/types_spec.rb",
241
+ "spec/warning_spec.rb",
242
+ "spec/warning_specs/assignment_in_condition_spec.rb",
243
+ "spec/warning_specs/comment_spacing_spec.rb",
244
+ "spec/warning_specs/extra_blank_lines_spec.rb",
245
+ "spec/warning_specs/extra_whitespace_spec.rb",
246
+ "spec/warning_specs/hash_symbol_18_warning_spec.rb",
247
+ "spec/warning_specs/hash_symbol_19_warning_spec.rb",
248
+ "spec/warning_specs/line_length_spec.rb",
249
+ "spec/warning_specs/misaligned_unindentation_spec.rb",
250
+ "spec/warning_specs/operator_spacing_spec.rb",
251
+ "spec/warning_specs/parens_on_declaration_spec.rb",
252
+ "spec/warning_specs/rescue_exception_spec.rb",
253
+ "spec/warning_specs/semicolon_spec.rb",
254
+ "spec/warning_specs/spec_helper.rb",
255
+ "spec/warning_specs/useless_double_quotes_spec.rb",
256
+ "status_reports/2010/12/2010-12-14.md",
257
+ "status_reports/2010/12/2010-12-23.md",
258
+ "status_reports/2010/12/2010-12-24.md",
259
+ "test/third_party_tests/rgl_tests/TestComponents.rb",
260
+ "test/third_party_tests/rgl_tests/TestCycles.rb",
261
+ "test/third_party_tests/rgl_tests/TestDirectedGraph.rb",
262
+ "test/third_party_tests/rgl_tests/TestDot.rb",
263
+ "test/third_party_tests/rgl_tests/TestEdge.rb",
264
+ "test/third_party_tests/rgl_tests/TestGraph.rb",
265
+ "test/third_party_tests/rgl_tests/TestGraphXML.rb",
266
+ "test/third_party_tests/rgl_tests/TestImplicit.rb",
267
+ "test/third_party_tests/rgl_tests/TestRdot.rb",
268
+ "test/third_party_tests/rgl_tests/TestTransitivity.rb",
269
+ "test/third_party_tests/rgl_tests/TestTraversal.rb",
270
+ "test/third_party_tests/rgl_tests/TestUnDirectedGraph.rb",
271
+ "test/third_party_tests/rgl_tests/examples/north/Graph.log",
272
+ "test/third_party_tests/rgl_tests/examples/north/g.10.0.graphml",
273
+ "test/third_party_tests/rgl_tests/examples/north/g.10.1.graphml",
274
+ "test/third_party_tests/rgl_tests/examples/north/g.10.11.graphml",
275
+ "test/third_party_tests/rgl_tests/examples/north/g.10.12.graphml",
276
+ "test/third_party_tests/rgl_tests/examples/north/g.10.13.graphml",
277
+ "test/third_party_tests/rgl_tests/examples/north/g.10.14.graphml",
278
+ "test/third_party_tests/rgl_tests/examples/north/g.10.15.graphml",
279
+ "test/third_party_tests/rgl_tests/examples/north/g.10.16.graphml",
280
+ "test/third_party_tests/rgl_tests/examples/north/g.10.17.graphml",
281
+ "test/third_party_tests/rgl_tests/examples/north/g.10.19.graphml",
282
+ "test/third_party_tests/rgl_tests/examples/north/g.10.2.graphml",
283
+ "test/third_party_tests/rgl_tests/examples/north/g.10.20.graphml",
284
+ "test/third_party_tests/rgl_tests/examples/north/g.10.22.graphml",
285
+ "test/third_party_tests/rgl_tests/examples/north/g.10.24.graphml",
286
+ "test/third_party_tests/rgl_tests/examples/north/g.10.25.graphml",
287
+ "test/third_party_tests/rgl_tests/examples/north/g.10.27.graphml",
288
+ "test/third_party_tests/rgl_tests/examples/north/g.10.28.graphml",
289
+ "test/third_party_tests/rgl_tests/examples/north/g.10.29.graphml",
290
+ "test/third_party_tests/rgl_tests/examples/north/g.10.3.graphml",
291
+ "test/third_party_tests/rgl_tests/examples/north/g.10.30.graphml",
292
+ "test/third_party_tests/rgl_tests/examples/north/g.10.31.graphml",
293
+ "test/third_party_tests/rgl_tests/examples/north/g.10.34.graphml",
294
+ "test/third_party_tests/rgl_tests/examples/north/g.10.37.graphml",
295
+ "test/third_party_tests/rgl_tests/examples/north/g.10.38.graphml",
296
+ "test/third_party_tests/rgl_tests/examples/north/g.10.39.graphml",
297
+ "test/third_party_tests/rgl_tests/examples/north/g.10.4.graphml",
298
+ "test/third_party_tests/rgl_tests/examples/north/g.10.40.graphml",
299
+ "test/third_party_tests/rgl_tests/examples/north/g.10.41.graphml",
300
+ "test/third_party_tests/rgl_tests/examples/north/g.10.42.graphml",
301
+ "test/third_party_tests/rgl_tests/examples/north/g.10.45.graphml",
302
+ "test/third_party_tests/rgl_tests/examples/north/g.10.46.graphml",
303
+ "test/third_party_tests/rgl_tests/examples/north/g.10.5.graphml",
304
+ "test/third_party_tests/rgl_tests/examples/north/g.10.50.graphml",
305
+ "test/third_party_tests/rgl_tests/examples/north/g.10.56.graphml",
306
+ "test/third_party_tests/rgl_tests/examples/north/g.10.57.graphml",
307
+ "test/third_party_tests/rgl_tests/examples/north/g.10.58.graphml",
308
+ "test/third_party_tests/rgl_tests/examples/north/g.10.6.graphml",
309
+ "test/third_party_tests/rgl_tests/examples/north/g.10.60.graphml",
310
+ "test/third_party_tests/rgl_tests/examples/north/g.10.61.graphml",
311
+ "test/third_party_tests/rgl_tests/examples/north/g.10.62.graphml",
312
+ "test/third_party_tests/rgl_tests/examples/north/g.10.68.graphml",
313
+ "test/third_party_tests/rgl_tests/examples/north/g.10.69.graphml",
314
+ "test/third_party_tests/rgl_tests/examples/north/g.10.7.graphml",
315
+ "test/third_party_tests/rgl_tests/examples/north/g.10.70.graphml",
316
+ "test/third_party_tests/rgl_tests/examples/north/g.10.71.graphml",
317
+ "test/third_party_tests/rgl_tests/examples/north/g.10.72.graphml",
318
+ "test/third_party_tests/rgl_tests/examples/north/g.10.74.graphml",
319
+ "test/third_party_tests/rgl_tests/examples/north/g.10.75.graphml",
320
+ "test/third_party_tests/rgl_tests/examples/north/g.10.78.graphml",
321
+ "test/third_party_tests/rgl_tests/examples/north/g.10.79.graphml",
322
+ "test/third_party_tests/rgl_tests/examples/north/g.10.8.graphml",
323
+ "test/third_party_tests/rgl_tests/examples/north/g.10.80.graphml",
324
+ "test/third_party_tests/rgl_tests/examples/north/g.10.82.graphml",
325
+ "test/third_party_tests/rgl_tests/examples/north/g.10.83.graphml",
326
+ "test/third_party_tests/rgl_tests/examples/north/g.10.85.graphml",
327
+ "test/third_party_tests/rgl_tests/examples/north/g.10.86.graphml",
328
+ "test/third_party_tests/rgl_tests/examples/north/g.10.88.graphml",
329
+ "test/third_party_tests/rgl_tests/examples/north/g.10.89.graphml",
330
+ "test/third_party_tests/rgl_tests/examples/north/g.10.9.graphml",
331
+ "test/third_party_tests/rgl_tests/examples/north/g.10.90.graphml",
332
+ "test/third_party_tests/rgl_tests/examples/north/g.10.91.graphml",
333
+ "test/third_party_tests/rgl_tests/examples/north/g.10.92.graphml",
334
+ "test/third_party_tests/rgl_tests/examples/north/g.10.93.graphml",
335
+ "test/third_party_tests/rgl_tests/examples/north/g.10.94.graphml",
336
+ "test/third_party_tests/rgl_tests/examples/north/g.12.8.graphml",
337
+ "test/third_party_tests/rgl_tests/examples/north/g.14.9.graphml",
338
+ "test/third_party_tests/rgl_tests/test_helper.rb",
339
+ "test/third_party_tests/test_inheritable_attributes.rb"
340
+ ]
341
+ s.homepage = %q{http://github.com/michaeledgar/laser}
342
+ s.require_paths = [%q{lib}]
343
+ s.rubygems_version = %q{1.8.5}
344
+ s.summary = %q{Analysis and linting tool for Ruby.}
345
+
346
+ if s.respond_to? :specification_version then
347
+ s.specification_version = 3
348
+
349
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
350
+ s.add_runtime_dependency(%q<treetop>, ["~> 1.4"])
351
+ s.add_runtime_dependency(%q<ripper-plus>, ["~> 1.3.0"])
352
+ s.add_runtime_dependency(%q<axiom_of_choice>, [">= 0"])
353
+ s.add_runtime_dependency(%q<stream>, ["= 0.5"])
354
+ s.add_runtime_dependency(%q<object_regex>, ["~> 1.0"])
355
+ s.add_runtime_dependency(%q<trollop>, ["~> 1.16.2"])
356
+ s.add_development_dependency(%q<rake>, ["~> 0.9.0"])
357
+ s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
358
+ s.add_development_dependency(%q<cucumber>, [">= 0.10.0"])
359
+ else
360
+ s.add_dependency(%q<treetop>, ["~> 1.4"])
361
+ s.add_dependency(%q<ripper-plus>, ["~> 1.3.0"])
362
+ s.add_dependency(%q<axiom_of_choice>, [">= 0"])
363
+ s.add_dependency(%q<stream>, ["= 0.5"])
364
+ s.add_dependency(%q<object_regex>, ["~> 1.0"])
365
+ s.add_dependency(%q<trollop>, ["~> 1.16.2"])
366
+ s.add_dependency(%q<rake>, ["~> 0.9.0"])
367
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
368
+ s.add_dependency(%q<cucumber>, [">= 0.10.0"])
369
+ end
370
+ else
371
+ s.add_dependency(%q<treetop>, ["~> 1.4"])
372
+ s.add_dependency(%q<ripper-plus>, ["~> 1.3.0"])
373
+ s.add_dependency(%q<axiom_of_choice>, [">= 0"])
374
+ s.add_dependency(%q<stream>, ["= 0.5"])
375
+ s.add_dependency(%q<object_regex>, ["~> 1.0"])
376
+ s.add_dependency(%q<trollop>, ["~> 1.16.2"])
377
+ s.add_dependency(%q<rake>, ["~> 0.9.0"])
378
+ s.add_dependency(%q<rspec>, ["~> 2.3.0"])
379
+ s.add_dependency(%q<cucumber>, [">= 0.10.0"])
380
+ end
381
+ end
382
+