laser 0.7.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +14 -0
- data/LICENSE +661 -0
- data/README.md +158 -0
- data/Rakefile +104 -0
- data/VERSION +1 -0
- data/bin/laser +7 -0
- data/design_docs/goals.md +57 -0
- data/design_docs/object_regex.md +426 -0
- data/design_docs/type_annotations.md +80 -0
- data/ext/laser/BasicBlock.cpp +572 -0
- data/ext/laser/BasicBlock.h +118 -0
- data/ext/laser/extconf.rb +3 -0
- data/features/laser.feature +25 -0
- data/features/step_definitions/laser_steps.rb +39 -0
- data/features/support/env.rb +14 -0
- data/features/support/testdata/1_input +1 -0
- data/features/support/testdata/1_output +1 -0
- data/features/support/testdata/2_input +4 -0
- data/features/support/testdata/2_output +4 -0
- data/features/support/testdata/3_input +8 -0
- data/features/support/testdata/3_output +11 -0
- data/features/support/testdata/4_input +5 -0
- data/features/support/testdata/4_output +5 -0
- data/features/support/testdata/5_input +13 -0
- data/laser.gemspec +382 -0
- data/lib/laser.rb +98 -0
- data/lib/laser/analysis/annotations.rb +95 -0
- data/lib/laser/analysis/annotations/annotation_config.yaml +3 -0
- data/lib/laser/analysis/annotations/comment_attachment_annotation.rb +66 -0
- data/lib/laser/analysis/annotations/node_pointers_annotation.rb +36 -0
- data/lib/laser/analysis/annotations/runtime_annotation.rb +55 -0
- data/lib/laser/analysis/argument_expansion.rb +132 -0
- data/lib/laser/analysis/arity.rb +34 -0
- data/lib/laser/analysis/bindings.rb +144 -0
- data/lib/laser/analysis/bootstrap/bootstrap.rb +298 -0
- data/lib/laser/analysis/bootstrap/laser_class.rb +106 -0
- data/lib/laser/analysis/bootstrap/laser_method.rb +255 -0
- data/lib/laser/analysis/bootstrap/laser_module.rb +403 -0
- data/lib/laser/analysis/bootstrap/laser_module_copy.rb +74 -0
- data/lib/laser/analysis/bootstrap/laser_object.rb +69 -0
- data/lib/laser/analysis/bootstrap/laser_proc.rb +150 -0
- data/lib/laser/analysis/bootstrap/laser_singleton_class.rb +44 -0
- data/lib/laser/analysis/comments.rb +35 -0
- data/lib/laser/analysis/control_flow.rb +28 -0
- data/lib/laser/analysis/control_flow/alias_analysis.rb +31 -0
- data/lib/laser/analysis/control_flow/basic_block.rb +105 -0
- data/lib/laser/analysis/control_flow/cfg_builder.rb +2505 -0
- data/lib/laser/analysis/control_flow/cfg_instruction.rb +190 -0
- data/lib/laser/analysis/control_flow/constant_propagation.rb +742 -0
- data/lib/laser/analysis/control_flow/control_flow_graph.rb +370 -0
- data/lib/laser/analysis/control_flow/lifetime_analysis.rb +91 -0
- data/lib/laser/analysis/control_flow/method_call_search.rb +26 -0
- data/lib/laser/analysis/control_flow/raise_properties.rb +25 -0
- data/lib/laser/analysis/control_flow/simulation.rb +385 -0
- data/lib/laser/analysis/control_flow/static_single_assignment.rb +185 -0
- data/lib/laser/analysis/control_flow/unreachability_analysis.rb +57 -0
- data/lib/laser/analysis/control_flow/unused_variables.rb +91 -0
- data/lib/laser/analysis/control_flow/yield_properties.rb +103 -0
- data/lib/laser/analysis/errors.rb +131 -0
- data/lib/laser/analysis/laser_utils.rb +18 -0
- data/lib/laser/analysis/lexical_analysis.rb +172 -0
- data/lib/laser/analysis/method_call.rb +68 -0
- data/lib/laser/analysis/protocol_registry.rb +30 -0
- data/lib/laser/analysis/scope.rb +118 -0
- data/lib/laser/analysis/sexp.rb +159 -0
- data/lib/laser/analysis/sexp_analysis.rb +40 -0
- data/lib/laser/analysis/sexp_extensions/constant_extraction.rb +115 -0
- data/lib/laser/analysis/sexp_extensions/source_location.rb +164 -0
- data/lib/laser/analysis/sexp_extensions/type_inference.rb +47 -0
- data/lib/laser/analysis/signature.rb +76 -0
- data/lib/laser/analysis/special_methods/send.rb +67 -0
- data/lib/laser/analysis/unused_methods.rb +21 -0
- data/lib/laser/analysis/visitor.rb +141 -0
- data/lib/laser/annotation_parser/annotations.treetop +126 -0
- data/lib/laser/annotation_parser/annotations_parser.rb +748 -0
- data/lib/laser/annotation_parser/class_annotations.treetop +82 -0
- data/lib/laser/annotation_parser/class_annotations_parser.rb +654 -0
- data/lib/laser/annotation_parser/overload.treetop +24 -0
- data/lib/laser/annotation_parser/overload_parser.rb +167 -0
- data/lib/laser/annotation_parser/parsers.rb +6 -0
- data/lib/laser/annotation_parser/structural.treetop +37 -0
- data/lib/laser/annotation_parser/structural_parser.rb +406 -0
- data/lib/laser/annotation_parser/useful_parsers.treetop +47 -0
- data/lib/laser/annotation_parser/useful_parsers_parser.rb +674 -0
- data/lib/laser/rake/task.rb +46 -0
- data/lib/laser/runner.rb +189 -0
- data/lib/laser/scanner.rb +169 -0
- data/lib/laser/standard_library/_thread.rb +110 -0
- data/lib/laser/standard_library/abbrev.rb +103 -0
- data/lib/laser/standard_library/array.rb +418 -0
- data/lib/laser/standard_library/base64.rb +91 -0
- data/lib/laser/standard_library/basic_object.rb +55 -0
- data/lib/laser/standard_library/benchmark.rb +556 -0
- data/lib/laser/standard_library/bignum.rb +185 -0
- data/lib/laser/standard_library/cgi.rb +275 -0
- data/lib/laser/standard_library/cgi/cookie.rb +147 -0
- data/lib/laser/standard_library/cgi/core.rb +791 -0
- data/lib/laser/standard_library/cgi/html.rb +1021 -0
- data/lib/laser/standard_library/cgi/session.rb +537 -0
- data/lib/laser/standard_library/cgi/session/pstore.rb +111 -0
- data/lib/laser/standard_library/cgi/util.rb +188 -0
- data/lib/laser/standard_library/class_definitions.rb +333 -0
- data/lib/laser/standard_library/comparable.rb +125 -0
- data/lib/laser/standard_library/complex.rb +162 -0
- data/lib/laser/standard_library/enumerable.rb +178 -0
- data/lib/laser/standard_library/exceptions.rb +135 -0
- data/lib/laser/standard_library/fixnum.rb +188 -0
- data/lib/laser/standard_library/float.rb +180 -0
- data/lib/laser/standard_library/hash.rb +237 -0
- data/lib/laser/standard_library/integer.rb +123 -0
- data/lib/laser/standard_library/laser_magic.rb +7 -0
- data/lib/laser/standard_library/nil_false_true.rb +113 -0
- data/lib/laser/standard_library/numbers.rb +192 -0
- data/lib/laser/standard_library/proc.rb +31 -0
- data/lib/laser/standard_library/set.rb +1348 -0
- data/lib/laser/standard_library/string.rb +666 -0
- data/lib/laser/standard_library/stringio.rb +2 -0
- data/lib/laser/standard_library/symbol.rb +125 -0
- data/lib/laser/standard_library/tsort.rb +242 -0
- data/lib/laser/support/acts_as_struct.rb +66 -0
- data/lib/laser/support/frequency.rb +55 -0
- data/lib/laser/support/inheritable_attributes.rb +145 -0
- data/lib/laser/support/module_extensions.rb +94 -0
- data/lib/laser/support/placeholder_object.rb +13 -0
- data/lib/laser/third_party/rgl/adjacency.rb +221 -0
- data/lib/laser/third_party/rgl/base.rb +228 -0
- data/lib/laser/third_party/rgl/bidirectional.rb +39 -0
- data/lib/laser/third_party/rgl/condensation.rb +47 -0
- data/lib/laser/third_party/rgl/connected_components.rb +138 -0
- data/lib/laser/third_party/rgl/control_flow.rb +170 -0
- data/lib/laser/third_party/rgl/depth_first_spanning_tree.rb +37 -0
- data/lib/laser/third_party/rgl/dominators.rb +124 -0
- data/lib/laser/third_party/rgl/dot.rb +93 -0
- data/lib/laser/third_party/rgl/graphxml.rb +51 -0
- data/lib/laser/third_party/rgl/implicit.rb +174 -0
- data/lib/laser/third_party/rgl/mutable.rb +117 -0
- data/lib/laser/third_party/rgl/rdot.rb +445 -0
- data/lib/laser/third_party/rgl/topsort.rb +72 -0
- data/lib/laser/third_party/rgl/transitivity.rb +180 -0
- data/lib/laser/third_party/rgl/traversal.rb +348 -0
- data/lib/laser/types/types.rb +433 -0
- data/lib/laser/version.rb +14 -0
- data/lib/laser/warning.rb +149 -0
- data/lib/laser/warning_sets/default.yml +13 -0
- data/lib/laser/warnings/assignment_in_condition.rb +20 -0
- data/lib/laser/warnings/comment_spacing.rb +31 -0
- data/lib/laser/warnings/extra_blank_lines.rb +30 -0
- data/lib/laser/warnings/extra_whitespace.rb +16 -0
- data/lib/laser/warnings/hash_symbol_18_warning.rb +63 -0
- data/lib/laser/warnings/hash_symbol_19_warning.rb +29 -0
- data/lib/laser/warnings/line_length.rb +115 -0
- data/lib/laser/warnings/misaligned_unindentation.rb +17 -0
- data/lib/laser/warnings/operator_spacing.rb +68 -0
- data/lib/laser/warnings/parens_on_declaration.rb +30 -0
- data/lib/laser/warnings/rescue_exception.rb +42 -0
- data/lib/laser/warnings/semicolon.rb +25 -0
- data/lib/laser/warnings/sexp_errors.rb +24 -0
- data/lib/laser/warnings/uncalled_method_warning.rb +7 -0
- data/lib/laser/warnings/useless_double_quotes.rb +38 -0
- data/spec/analysis_specs/annotations_spec.rb +47 -0
- data/spec/analysis_specs/annotations_specs/comment_attachment_spec.rb +68 -0
- data/spec/analysis_specs/annotations_specs/node_pointers_annotation_spec.rb +90 -0
- data/spec/analysis_specs/annotations_specs/runtime_annotation_spec.rb +135 -0
- data/spec/analysis_specs/annotations_specs/spec_helper.rb +33 -0
- data/spec/analysis_specs/argument_expansion_spec.rb +113 -0
- data/spec/analysis_specs/bindings_spec.rb +36 -0
- data/spec/analysis_specs/comment_spec.rb +93 -0
- data/spec/analysis_specs/control_flow_specs/cfg_instruction_spec.rb +111 -0
- data/spec/analysis_specs/control_flow_specs/constant_propagation_spec.rb +560 -0
- data/spec/analysis_specs/control_flow_specs/control_flow_graph_spec.rb +5 -0
- data/spec/analysis_specs/control_flow_specs/raise_properties_spec.rb +310 -0
- data/spec/analysis_specs/control_flow_specs/raise_type_inference_spec.rb +301 -0
- data/spec/analysis_specs/control_flow_specs/return_type_inference_spec.rb +431 -0
- data/spec/analysis_specs/control_flow_specs/simulation_spec.rb +158 -0
- data/spec/analysis_specs/control_flow_specs/spec_helper.rb +110 -0
- data/spec/analysis_specs/control_flow_specs/tuple_misuse_inference_spec.rb +125 -0
- data/spec/analysis_specs/control_flow_specs/unreachability_analysis_spec.rb +76 -0
- data/spec/analysis_specs/control_flow_specs/unused_variable_spec.rb +99 -0
- data/spec/analysis_specs/control_flow_specs/yield_properties_spec.rb +372 -0
- data/spec/analysis_specs/error_spec.rb +30 -0
- data/spec/analysis_specs/laser_class_spec.rb +322 -0
- data/spec/analysis_specs/lexical_analysis_spec.rb +184 -0
- data/spec/analysis_specs/protocol_registry_spec.rb +63 -0
- data/spec/analysis_specs/scope_annotation_spec.rb +1013 -0
- data/spec/analysis_specs/scope_spec.rb +126 -0
- data/spec/analysis_specs/sexp_analysis_spec.rb +30 -0
- data/spec/analysis_specs/sexp_extension_specs/constant_extraction_spec.rb +309 -0
- data/spec/analysis_specs/sexp_extension_specs/source_location_spec.rb +231 -0
- data/spec/analysis_specs/sexp_extension_specs/spec_helper.rb +1 -0
- data/spec/analysis_specs/sexp_extension_specs/type_inference_spec.rb +252 -0
- data/spec/analysis_specs/sexp_spec.rb +167 -0
- data/spec/analysis_specs/spec_helper.rb +27 -0
- data/spec/analysis_specs/unused_methods_spec.rb +65 -0
- data/spec/analysis_specs/visitor_spec.rb +64 -0
- data/spec/annotation_parser_specs/annotations_parser_spec.rb +89 -0
- data/spec/annotation_parser_specs/class_annotation_parser_spec.rb +120 -0
- data/spec/annotation_parser_specs/overload_parser_spec.rb +39 -0
- data/spec/annotation_parser_specs/parsers_spec.rb +14 -0
- data/spec/annotation_parser_specs/spec_helper.rb +1 -0
- data/spec/annotation_parser_specs/structural_parser_spec.rb +67 -0
- data/spec/laser_spec.rb +14 -0
- data/spec/rake_specs/spec_helper.rb +1 -0
- data/spec/rake_specs/task_spec.rb +67 -0
- data/spec/runner_spec.rb +207 -0
- data/spec/scanner_spec.rb +75 -0
- data/spec/spec_helper.rb +121 -0
- data/spec/standard_library/exceptions_spec.rb +19 -0
- data/spec/standard_library/globals_spec.rb +14 -0
- data/spec/standard_library/set_spec.rb +31 -0
- data/spec/standard_library/spec_helper.rb +1 -0
- data/spec/standard_library/standard_library_spec.rb +302 -0
- data/spec/support_specs/acts_as_struct_spec.rb +94 -0
- data/spec/support_specs/frequency_spec.rb +23 -0
- data/spec/support_specs/module_extensions_spec.rb +117 -0
- data/spec/support_specs/spec_helper.rb +1 -0
- data/spec/type_specs/spec_helper.rb +1 -0
- data/spec/type_specs/types_spec.rb +133 -0
- data/spec/warning_spec.rb +95 -0
- data/spec/warning_specs/assignment_in_condition_spec.rb +68 -0
- data/spec/warning_specs/comment_spacing_spec.rb +65 -0
- data/spec/warning_specs/extra_blank_lines_spec.rb +70 -0
- data/spec/warning_specs/extra_whitespace_spec.rb +33 -0
- data/spec/warning_specs/hash_symbol_18_warning_spec.rb +89 -0
- data/spec/warning_specs/hash_symbol_19_warning_spec.rb +63 -0
- data/spec/warning_specs/line_length_spec.rb +173 -0
- data/spec/warning_specs/misaligned_unindentation_spec.rb +35 -0
- data/spec/warning_specs/operator_spacing_spec.rb +104 -0
- data/spec/warning_specs/parens_on_declaration_spec.rb +57 -0
- data/spec/warning_specs/rescue_exception_spec.rb +105 -0
- data/spec/warning_specs/semicolon_spec.rb +58 -0
- data/spec/warning_specs/spec_helper.rb +1 -0
- data/spec/warning_specs/useless_double_quotes_spec.rb +74 -0
- data/status_reports/2010/12/2010-12-14.md +163 -0
- data/status_reports/2010/12/2010-12-23.md +298 -0
- data/status_reports/2010/12/2010-12-24.md +6 -0
- data/test/third_party_tests/rgl_tests/TestComponents.rb +65 -0
- data/test/third_party_tests/rgl_tests/TestCycles.rb +61 -0
- data/test/third_party_tests/rgl_tests/TestDirectedGraph.rb +125 -0
- data/test/third_party_tests/rgl_tests/TestDot.rb +18 -0
- data/test/third_party_tests/rgl_tests/TestEdge.rb +34 -0
- data/test/third_party_tests/rgl_tests/TestGraph.rb +71 -0
- data/test/third_party_tests/rgl_tests/TestGraphXML.rb +57 -0
- data/test/third_party_tests/rgl_tests/TestImplicit.rb +52 -0
- data/test/third_party_tests/rgl_tests/TestRdot.rb +863 -0
- data/test/third_party_tests/rgl_tests/TestTransitivity.rb +129 -0
- data/test/third_party_tests/rgl_tests/TestTraversal.rb +220 -0
- data/test/third_party_tests/rgl_tests/TestUnDirectedGraph.rb +102 -0
- data/test/third_party_tests/rgl_tests/examples/north/Graph.log +128 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.0.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.1.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.11.graphml +31 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.12.graphml +27 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.13.graphml +27 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.14.graphml +27 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.15.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.16.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.17.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.19.graphml +37 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.2.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.20.graphml +38 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.22.graphml +43 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.24.graphml +30 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.25.graphml +45 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.27.graphml +38 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.28.graphml +30 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.29.graphml +38 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.3.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.30.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.31.graphml +42 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.34.graphml +42 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.37.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.38.graphml +38 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.39.graphml +36 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.4.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.40.graphml +37 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.41.graphml +37 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.42.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.45.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.46.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.5.graphml +31 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.50.graphml +30 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.56.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.57.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.58.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.6.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.60.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.61.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.62.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.68.graphml +30 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.69.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.7.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.70.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.71.graphml +27 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.72.graphml +28 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.74.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.75.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.78.graphml +27 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.79.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.8.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.80.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.82.graphml +35 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.83.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.85.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.86.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.88.graphml +37 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.89.graphml +29 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.9.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.90.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.91.graphml +31 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.92.graphml +26 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.93.graphml +32 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.10.94.graphml +34 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.12.8.graphml +40 -0
- data/test/third_party_tests/rgl_tests/examples/north/g.14.9.graphml +36 -0
- data/test/third_party_tests/rgl_tests/test_helper.rb +7 -0
- data/test/third_party_tests/test_inheritable_attributes.rb +187 -0
- 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,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
|
data/laser.gemspec
ADDED
@@ -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
|
+
|