Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Renamed SexpAnalysis to Analysis. closes #11.

  • Loading branch information...
commit 1c5d44ff605697d244b9a4b23ded60fff064a94f 1 parent 621a3f4
Michael Edgar authored
Showing with 81 additions and 81 deletions.
  1. +3 −3 ext/laser/BasicBlock.cpp
  2. +3 −3 lib/laser.rb
  3. +3 −3 lib/laser/analysis/annotations.rb
  4. +1 −1  lib/laser/analysis/annotations/comment_attachment_annotation.rb
  5. +2 −2 lib/laser/analysis/annotations/node_pointers_annotation.rb
  6. +1 −1  lib/laser/analysis/annotations/runtime_annotation.rb
  7. +1 −1  lib/laser/analysis/argument_expansion.rb
  8. +1 −1  lib/laser/analysis/arity.rb
  9. +1 −1  lib/laser/analysis/bindings.rb
  10. +2 −2 lib/laser/analysis/bootstrap.rb
  11. +1 −1  lib/laser/analysis/control_flow.rb
  12. +2 −2 lib/laser/analysis/control_flow/alias_analysis.rb
  13. +1 −1  lib/laser/analysis/control_flow/basic_block.rb
  14. +1 −1  lib/laser/analysis/control_flow/cfg_builder.rb
  15. +1 −1  lib/laser/analysis/control_flow/cfg_instruction.rb
  16. +2 −2 lib/laser/analysis/control_flow/constant_propagation.rb
  17. +1 −1  lib/laser/analysis/control_flow/control_flow_graph.rb
  18. +2 −2 lib/laser/analysis/control_flow/lifetime_analysis.rb
  19. +2 −2 lib/laser/analysis/control_flow/method_call_search.rb
  20. +1 −1  lib/laser/analysis/control_flow/raise_properties.rb
  21. +2 −2 lib/laser/analysis/control_flow/simulation.rb
  22. +1 −1  lib/laser/analysis/control_flow/static_single_assignment.rb
  23. +1 −1  lib/laser/analysis/control_flow/unreachability_analysis.rb
  24. +2 −2 lib/laser/analysis/control_flow/unused_variables.rb
  25. +2 −2 lib/laser/analysis/control_flow/yield_properties.rb
  26. +1 −1  lib/laser/analysis/laser_class.rb
  27. +1 −1  lib/laser/analysis/laser_utils.rb
  28. +1 −1  lib/laser/analysis/method_call.rb
  29. +1 −1  lib/laser/analysis/protocol_registry.rb
  30. +1 −1  lib/laser/analysis/scope.rb
  31. +2 −2 lib/laser/analysis/sexp.rb
  32. +2 −2 lib/laser/analysis/sexp_analysis.rb
  33. +1 −1  lib/laser/analysis/sexp_extensions/constant_extraction.rb
  34. +1 −1  lib/laser/analysis/sexp_extensions/source_location.rb
  35. +1 −1  lib/laser/analysis/sexp_extensions/type_inference.rb
  36. +1 −1  lib/laser/analysis/signature.rb
  37. +1 −1  lib/laser/analysis/special_methods/send.rb
  38. +1 −1  lib/laser/analysis/visitor.rb
  39. +2 −2 lib/laser/runner.rb
  40. +2 −2 lib/laser/third_party/rgl/control_flow.rb
  41. +1 −1  lib/laser/third_party/rgl/dominators.rb
  42. +3 −3 lib/laser/types/types.rb
  43. +1 −1  lib/laser/warning.rb
  44. +1 −1  spec/analysis_specs/annotations_spec.rb
  45. +1 −1  spec/analysis_specs/argument_expansion_spec.rb
  46. +7 −7 spec/analysis_specs/bindings_spec.rb
  47. +1 −1  spec/analysis_specs/control_flow_specs/spec_helper.rb
  48. +3 −3 spec/analysis_specs/scope_annotation_spec.rb
  49. +2 −2 spec/analysis_specs/sexp_analysis_spec.rb
  50. +1 −1  spec/analysis_specs/spec_helper.rb
  51. +1 −1  spec/spec_helper.rb
View
6 ext/laser/BasicBlock.cpp
@@ -2,7 +2,7 @@
#include "ruby.h"
VALUE rb_mLaser;
-VALUE rb_mSexpAnalysis;
+VALUE rb_mAnalysis;
VALUE rb_mControlFlow;
VALUE rb_cBasicBlock;
@@ -517,8 +517,8 @@ extern "C" {
VALUE Init_BasicBlock()
{
rb_mLaser = rb_define_module("Laser");
- rb_mSexpAnalysis = rb_define_module_under(rb_mLaser, "SexpAnalysis");
- rb_mControlFlow = rb_define_module_under(rb_mSexpAnalysis, "ControlFlow");
+ rb_mAnalysis = rb_define_module_under(rb_mLaser, "Analysis");
+ rb_mControlFlow = rb_define_module_under(rb_mAnalysis, "ControlFlow");
rb_cBasicBlock = rb_define_class_under(rb_mControlFlow, "BasicBlock", rb_cObject);
rb_define_alloc_func(rb_cBasicBlock, bb_alloc);
View
6 lib/laser.rb
@@ -71,10 +71,10 @@ def self.debug?
# 2. Remove spurs
# 3. Bend at the waist
# 4. PULL UP ON THEM BOOTSTRAPS!
-Laser::SexpAnalysis::Bootstrap.bootstrap
+Laser::Analysis::Bootstrap.bootstrap
# Load the type engine
require 'laser/types/types'
-Laser::SexpAnalysis::Bootstrap.bootstrap_magic
+Laser::Analysis::Bootstrap.bootstrap_magic
require 'laser/annotation_parser/parsers'
require 'laser/analysis/visitor'
@@ -91,7 +91,7 @@ def self.debug?
[path, File.read(path)]
end.tap do |tuples|
begin
- trees = Laser::SexpAnalysis::Annotations.annotate_inputs(tuples, optimize: false)
+ trees = Laser::Analysis::Annotations.annotate_inputs(tuples, optimize: false)
trees.each do |filename, tree|
if tree.all_errors != []
$stderr.puts "Default file #{filename} had these errors:"
View
6 lib/laser/analysis/annotations.rb
@@ -1,6 +1,6 @@
require 'yaml'
module Laser
- module SexpAnalysis
+ module Analysis
module Annotations
extend ModuleExtensions
# Global annotations are only run once, at the root.
@@ -81,10 +81,10 @@ def self.add_global_annotator(*args)
Annotations.global_annotations.concat args.map(&:new)
end
def self.add_property(*args)
- SexpAnalysis::Sexp.__send__(:attr_accessor, *args)
+ Analysis::Sexp.__send__(:attr_accessor, *args)
end
def self.add_computed_property(name, &blk)
- SexpAnalysis::Sexp.__send__(:define_method, name, &blk)
+ Analysis::Sexp.__send__(:define_method, name, &blk)
end
end
end
View
2  lib/laser/analysis/annotations/comment_attachment_annotation.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This annotation attempts to attach each comment in the program to the
# first node in the AST that follows the comment, as well as all subnodes with
# the same source location.
View
4 lib/laser/analysis/annotations/node_pointers_annotation.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This is a simple inherited attribute applied to each node,
# giving a pointer to that node's parent. That way AST traversal
# is easier.
@@ -24,7 +24,7 @@ class NodePointersAnnotation < BasicAnnotation
def default_visit(node)
children = node.children
children.each_with_index do |elt, idx|
- next unless SexpAnalysis::Sexp === elt
+ next unless Analysis::Sexp === elt
elt.parent = node
elt.next = children[idx+1]
elt.prev = children[idx-1] if idx >= 1
View
2  lib/laser/analysis/annotations/runtime_annotation.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This is a simple inherited attribute that specifies whether a given node
# will be executed when at load-time or at run-time. In short, method bodies
# and not-run blocks at the top-level are not run, and everything else is.
View
2  lib/laser/analysis/argument_expansion.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This class handles the interpretation and expansion of arguments being
# passed to a method call.
class ArgumentExpansion
View
2  lib/laser/analysis/arity.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# The arity of a method is an instance of Arity. It's basically a range
# with some helper methods.
class Arity < Range
View
2  lib/laser/analysis/bindings.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module Bindings
# This class represents a Base in Ruby. It may have a known type,
# class, value (if constant!), and a variety of other details.
View
4 lib/laser/analysis/bootstrap.rb
@@ -1,9 +1,9 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This module contains bootstrapping code. This initializes the first classes
# and modules that build up the meta-model (Class, Module, Object).
module Bootstrap
- extend SexpAnalysis
+ extend Analysis
VISIBILITY_STACK_NAME = '$#visibility_stack'
VISIBILITY_STACK = Bindings::GlobalVariableBinding.new(VISIBILITY_STACK_NAME, [:private])
EXCEPTION_STACK_NAME = '$#exception_stack'
View
2  lib/laser/analysis/control_flow.rb
@@ -16,7 +16,7 @@
require 'laser/analysis/control_flow/control_flow_graph'
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
def self.perform_cfg_analysis(tree, text, opts={})
graph = GraphBuilder.new(tree).build
View
4 lib/laser/analysis/control_flow/alias_analysis.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Finds the properties of how the code yields to a block argument.
# Should not be used on top-level code, naturally.
@@ -24,5 +24,5 @@ def value_aliases(value_to_match)
end
end
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end #
View
2  lib/laser/analysis/control_flow/basic_block.rb
@@ -1,7 +1,7 @@
require 'enumerator'
require 'set'
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Can't use the < DelegateClass(Array) syntax because of code reloading.
class BasicBlock
View
2  lib/laser/analysis/control_flow/cfg_builder.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# This class builds a control flow graph. The algorithm used is
# derived from Robert Morgan's "Building an Optimizing Compiler".
View
2  lib/laser/analysis/control_flow/cfg_instruction.rb
@@ -1,6 +1,6 @@
require 'set'
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
class Instruction < BasicObject
attr_reader :node, :block, :body, :ignore_privacy
View
4 lib/laser/analysis/control_flow/constant_propagation.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
INAPPLICABLE = PlaceholderObject.new('INAPPLICABLE')
@@ -657,5 +657,5 @@ def cp_magic(instruction, method_name, *args)
end
end # ConstantPropagation
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end #
View
2  lib/laser/analysis/control_flow/control_flow_graph.rb
@@ -2,7 +2,7 @@
require 'laser/third_party/rgl/transitivity'
require 'laser/third_party/rgl/dominators'
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
class ControlFlowGraph < RGL::ControlFlowGraph
include ConstantPropagation
View
4 lib/laser/analysis/control_flow/lifetime_analysis.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Methods for computing the lifetime of the variables in
# the control flow graph.
@@ -87,5 +87,5 @@ def find_live_visited(current, visit, live)
end # module LifetimeAnalysis
end # module ControlFlow
- end # module SexpAnalysis
+ end # module Analysis
end # module Laser
View
4 lib/laser/analysis/control_flow/method_call_search.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Finds the properties of how the code yields to a block argument.
# Should not be used on top-level code, naturally.
@@ -21,6 +21,6 @@ def find_method_calls(method_to_find)
end
end
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end #
View
2  lib/laser/analysis/control_flow/raise_properties.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Finds the properties of how the code yields to a block argument.
# Should not be used on top-level code, naturally.
View
4 lib/laser/analysis/control_flow/simulation.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Simulation of a CFG. Requires values for the formal arguments, if any.
# Stops as soon as an unpredictable statement is reached.
@@ -354,5 +354,5 @@ def simulate_module_eval(receiver, args, block)
end
end # Simulation
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end # Laser
View
2  lib/laser/analysis/control_flow/static_single_assignment.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Methods for computing the static single assignment form of a
# Control Flow Graph.
View
2  lib/laser/analysis/control_flow/unreachability_analysis.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
module UnreachabilityAnalysis
# Dead Code Discovery: O(|V| + |E|)!
View
4 lib/laser/analysis/control_flow/unused_variables.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Finds unused variables in the control-flow graph. See thesis for
# the algorithm and proof of correctness.
@@ -87,5 +87,5 @@ def killable_with_unused_target?(insn)
end
end
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end #
View
4 lib/laser/analysis/control_flow/yield_properties.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ControlFlow
# Finds the properties of how the code yields to a block argument.
# Should not be used on top-level code, naturally.
@@ -102,5 +102,5 @@ def potential_block_calls(block_value = nil)
end
end
end # ControlFlow
- end # SexpAnalysis
+ end # Analysis
end #
View
2  lib/laser/analysis/laser_class.rb
@@ -1,7 +1,7 @@
require 'pp'
require 'delegate'
module Laser
- module SexpAnalysis
+ module Analysis
UNDEFINED = PlaceholderObject.new('UNDEFINED')
VARYING = PlaceholderObject.new('VARYING')
View
2  lib/laser/analysis/laser_utils.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module Utilities
module_function
def klass_for(arg)
View
2  lib/laser/analysis/method_call.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
class MethodCall
attr_reader :node
View
2  lib/laser/analysis/protocol_registry.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# The ProtocolRegistry module handles negotiating instantiated protocols at
# compile-time, such as the automatically-generated protocols created by a
# class creation (as each class has a corresponding protocol, though some
View
2  lib/laser/analysis/scope.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# This class models a scope in Ruby. It has a constant table,
# a self pointer, and a parent pointer to the enclosing scope.
# It also has a local variable table.
View
4 lib/laser/analysis/sexp.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# Replaces the ParseTree Sexps by adding a few handy-dandy methods.
class Sexp < Array
include SexpExtensions::ConstantExtraction
@@ -41,7 +41,7 @@ def add_error(error)
#
# @return Boolean
def is_sexp?(sexp)
- SexpAnalysis::Sexp === sexp
+ Analysis::Sexp === sexp
end
def lines
View
4 lib/laser/analysis/sexp_analysis.rb
@@ -1,7 +1,7 @@
module Laser
# This is a set of methods that get provided to Warnings so they can perform
# parse-tree analysis of their bodies.
- module SexpAnalysis
+ module Analysis
extend ModuleExtensions
# inputs: Array<(String, String)>
@@ -18,7 +18,7 @@ def self.analyze_inputs(inputs)
# @return [Sexp, NilClass] the sexp representing the input text.
def parse(body = self.body)
return PARSING_CACHE[body] if PARSING_CACHE[body]
- pairs = SexpAnalysis.analyze_inputs([['(stdin)', body]])
+ pairs = Analysis.analyze_inputs([['(stdin)', body]])
PARSING_CACHE[body] = pairs[0][1]
end
View
2  lib/laser/analysis/sexp_extensions/constant_extraction.rb
@@ -1,4 +1,4 @@
-module Laser::SexpAnalysis
+module Laser::Analysis
module SexpExtensions
module ConstantExtraction
View
2  lib/laser/analysis/sexp_extensions/source_location.rb
@@ -1,4 +1,4 @@
-module Laser::SexpAnalysis
+module Laser::Analysis
module SexpExtensions
module SourceLocation
View
2  lib/laser/analysis/sexp_extensions/type_inference.rb
@@ -1,4 +1,4 @@
-module Laser::SexpAnalysis
+module Laser::Analysis
module SexpExtensions
module TypeInference
# Finds the type of the AST node. This depends on the node's scope sometimes,
View
2  lib/laser/analysis/signature.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module ArgumentListHandling
# Returns the hash representing the arguments in a signature, based on an
# argument list (:params) from the parser.
View
2  lib/laser/analysis/special_methods/send.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
module SpecialMethods
# Provides precise analysis of send methods. This is necessary for the
# analyzer to be able to tell where to look for semantic information when
View
2  lib/laser/analysis/visitor.rb
@@ -1,5 +1,5 @@
module Laser
- module SexpAnalysis
+ module Analysis
# Visitor: a set of methods for visiting an AST. The
# default implementations visit each child and do no
# other processing. By including this module, and
View
4 lib/laser/runner.rb
@@ -92,9 +92,9 @@ def get_warning_options
# Prints the known modules after analysis.
def print_modules
- SexpAnalysis::LaserModule.all_modules.map do |mod|
+ Analysis::LaserModule.all_modules.map do |mod|
result = []
- result << if SexpAnalysis::LaserClass === mod && mod.superclass
+ result << if Analysis::LaserClass === mod && mod.superclass
then "#{mod.path} < #{mod.superclass.path}"
else mod.name
end
View
4 lib/laser/third_party/rgl/control_flow.rb
@@ -19,8 +19,8 @@ class ControlFlowGraph
attr_reader :vertices, :vertex_lookup
def initialize
- @enter = Laser::SexpAnalysis::ControlFlow::TerminalBasicBlock.new('Enter')
- @exit = Laser::SexpAnalysis::ControlFlow::TerminalBasicBlock.new('Exit')
+ @enter = Laser::Analysis::ControlFlow::TerminalBasicBlock.new('Enter')
+ @exit = Laser::Analysis::ControlFlow::TerminalBasicBlock.new('Exit')
@vertices = Set[@enter, @exit]
@vertex_lookup = {'Enter' => @enter, 'Exit' => @exit}
end
View
2  lib/laser/third_party/rgl/dominators.rb
@@ -38,7 +38,7 @@ def dominator_tree(start_node = self.enter)
# doms is IDOM. All outward edges connect an IDom to its dominee.
d_tree = self.class.new
(vertices - [enter, exit]).each do |b|
- copy = Laser::SexpAnalysis::ControlFlow::BasicBlock.new(b.name)
+ copy = Laser::Analysis::ControlFlow::BasicBlock.new(b.name)
copy.instructions = b.instructions
d_tree.add_vertex(copy)
end
View
6 lib/laser/types/types.rb
@@ -119,7 +119,7 @@ class ClassObjectType < Base
attr_reader :class_object
def initialize(class_object)
if String === class_object
- @class_object = SexpAnalysis::ClassRegistry[class_object]
+ @class_object = Analysis::ClassRegistry[class_object]
else
@class_object = class_object
end
@@ -185,11 +185,11 @@ def matching_methods(name)
end
def possible_classes
- klass = SexpAnalysis::ClassRegistry[class_name]
+ klass = Analysis::ClassRegistry[class_name]
case variance
when :invariant then ::Set[klass]
when :covariant
- if SexpAnalysis::LaserClass === klass
+ if Analysis::LaserClass === klass
then ::Set.new klass.subset
else ::Set.new klass.classes_including.map(&:subset).flatten # module
end
View
2  lib/laser/warning.rb
@@ -2,7 +2,7 @@ module Laser
Warning = Struct.new(:name, :file, :body, :line_number, :severity) do
extend ModuleExtensions
include LexicalAnalysis
- include SexpAnalysis
+ include Analysis
cattr_accessor :short_name
cattr_accessor_with_default :match_filters, []
View
2  spec/analysis_specs/annotations_spec.rb
@@ -25,7 +25,7 @@ def annotate!(node)
describe '#add_property' do
selectors = [:aaa, :aaa=, :bbb, :bbb=]
- it 'adds accessors to SexpAnalysis::Sexp in a very intrusive manner' do
+ it 'adds accessors to Analysis::Sexp in a very intrusive manner' do
@class.add_property :aaa, :bbb
sexp = Sexp.new([:program, []])
selectors.each {|sel| sexp.should respond_to(sel)}
View
2  spec/analysis_specs/argument_expansion_spec.rb
@@ -1,6 +1,6 @@
require_relative 'spec_helper'
-describe SexpAnalysis::ArgumentExpansion do
+describe Analysis::ArgumentExpansion do
describe '#arity' do
it 'can figure out the arity of a simple method call with no arguments' do
tree = annotate_all('foo( )')[1][0][2]
View
14 spec/analysis_specs/bindings_spec.rb
@@ -1,10 +1,10 @@
require_relative 'spec_helper'
-describe SexpAnalysis::Bindings::Base do
+describe Analysis::Bindings::Base do
describe '#initialize' do
it 'has a simple struct-like initializer' do
name, value = many_mocks(2)
- sym = SexpAnalysis::Bindings::Base.new(name, value)
+ sym = Analysis::Bindings::Base.new(name, value)
sym.name.should == name
sym.value.should == value
end
@@ -13,22 +13,22 @@
describe '#<=>' do
it 'should compare based on name alone' do
value = mock
- sym1 = SexpAnalysis::Bindings::Base.new('hello', value)
- sym2 = SexpAnalysis::Bindings::Base.new('helga', value)
+ sym1 = Analysis::Bindings::Base.new('hello', value)
+ sym2 = Analysis::Bindings::Base.new('helga', value)
sym1.should > sym2
end
end
end
-describe SexpAnalysis::Bindings::ConstantBinding do
+describe Analysis::Bindings::ConstantBinding do
describe '#bind!' do
it 'should raise on a rebinding when not forcing' do
- sym = SexpAnalysis::Bindings::ConstantBinding.new('hi', 1)
+ sym = Analysis::Bindings::ConstantBinding.new('hi', 1)
expect { sym.bind!(2) }.to raise_error(TypeError)
end
it 'should not raise on a rebinding when forcing' do
- sym = SexpAnalysis::Bindings::ConstantBinding.new('hi', 3)
+ sym = Analysis::Bindings::ConstantBinding.new('hi', 3)
sym.bind!(4, true)
sym.value.should == 4
end
View
2  spec/analysis_specs/control_flow_specs/spec_helper.rb
@@ -84,7 +84,7 @@ def cfg_builder_for(input)
end
-include Laser::SexpAnalysis
+include Laser::Analysis
def annotate_all_cfg(body)
inputs = [['(stdin)', body]]
inputs.map! do |filename, text|
View
6 spec/analysis_specs/scope_annotation_spec.rb
@@ -863,7 +863,7 @@ module Or::Is::Ten::Kind::Silly
before do
@input = %q{
module Laser
- module SexpAnalysis
+ module Analysis
module Bindings
# This class represents a Base in Ruby. It may have a known protocol (type),
# class, value (if constant!), and a variety of other details.
@@ -966,9 +966,9 @@ def initialize(name, value, kind, default_value = nil)
it 'correctly resolves many bindings, creates new modules and classes, and defines methods' do
tree = annotate_all(@input)
- bindings_mod = 'Laser::SexpAnalysis::Bindings'
+ bindings_mod = 'Laser::Analysis::Bindings'
ClassRegistry['Laser'].should be_a(LaserModule)
- ClassRegistry['Laser::SexpAnalysis'].should be_a(LaserModule)
+ ClassRegistry['Laser::Analysis'].should be_a(LaserModule)
ClassRegistry[bindings_mod].should be_a(LaserModule)
ClassRegistry["#{bindings_mod}::Base"].should be_a(LaserClass)
ClassRegistry["#{bindings_mod}::KeywordBinding"].should be_a(LaserClass)
View
4 spec/analysis_specs/sexp_analysis_spec.rb
@@ -1,9 +1,9 @@
require_relative 'spec_helper'
-describe SexpAnalysis do
+describe Analysis do
before do
@class = Class.new do
- include SexpAnalysis
+ include Analysis
attr_accessor :body
def initialize(body)
self.body = body
View
2  spec/analysis_specs/spec_helper.rb
@@ -1,5 +1,5 @@
require_relative '../spec_helper'
-include SexpAnalysis
+include Analysis
module AnalysisHelpers
def clean_registry
View
2  spec/spec_helper.rb
@@ -17,7 +17,7 @@ module Laser
const_set(:TESTS_ACTIVATED, true)
end
-include Laser::SexpAnalysis
+include Laser::Analysis
RSpec::Matchers.define :equal_type do |type|
match do |orig|
Please sign in to comment.
Something went wrong with that request. Please try again.