nudge 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Rakefile +11 -7
- data/VERSION +1 -1
- data/lib/instructions/bool/bool_and.rb +19 -0
- data/lib/instructions/bool/bool_define.rb +6 -0
- data/lib/instructions/bool/bool_depth.rb +6 -0
- data/lib/instructions/bool/bool_duplicate.rb +6 -0
- data/lib/instructions/bool/bool_equal_q.rb +19 -0
- data/lib/instructions/bool/bool_flush.rb +6 -0
- data/lib/instructions/bool/bool_not.rb +18 -0
- data/lib/instructions/bool/bool_or.rb +19 -0
- data/lib/instructions/bool/bool_pop.rb +6 -0
- data/lib/instructions/bool/bool_random.rb +13 -0
- data/lib/instructions/bool/bool_rotate.rb +6 -0
- data/lib/instructions/bool/bool_shove.rb +6 -0
- data/lib/instructions/bool/bool_swap.rb +6 -0
- data/lib/instructions/bool/bool_xor.rb +19 -0
- data/lib/instructions/bool/bool_yank.rb +6 -0
- data/lib/instructions/bool/bool_yankdup.rb +6 -0
- data/lib/instructions/code/code_atom_q.rb +16 -0
- data/lib/instructions/code/code_backbone_points.rb +24 -0
- data/lib/instructions/code/code_car.rb +20 -0
- data/lib/instructions/code/code_cdr.rb +20 -0
- data/lib/instructions/code/code_concatenate.rb +31 -0
- data/lib/instructions/code/code_cons.rb +25 -0
- data/lib/instructions/code/code_container.rb +28 -0
- data/lib/instructions/code/code_contains_q.rb +22 -0
- data/lib/instructions/code/code_define.rb +21 -0
- data/lib/instructions/code/code_depth.rb +6 -0
- data/lib/instructions/code/code_discrepancy.rb +29 -0
- data/lib/instructions/code/code_do_count.rb +27 -0
- data/lib/instructions/code/code_do_range.rb +42 -0
- data/lib/instructions/code/code_do_times.rb +38 -0
- data/lib/instructions/code/code_duplicate.rb +6 -0
- data/lib/instructions/code/code_equal_q.rb +17 -0
- data/lib/instructions/code/code_execute.rb +19 -0
- data/lib/instructions/code/code_execute_then_pop.rb +20 -0
- data/lib/instructions/code/code_flush.rb +6 -0
- data/lib/instructions/code/code_gsub.rb +35 -0
- data/lib/instructions/code/code_if.rb +22 -0
- data/lib/instructions/code/code_instructions.rb +15 -0
- data/lib/instructions/code/code_list.rb +19 -0
- data/lib/instructions/code/code_member_q.rb +26 -0
- data/lib/instructions/code/code_name_lookup.rb +19 -0
- data/lib/instructions/code/code_nth.rb +24 -0
- data/lib/instructions/code/code_nth_cdr.rb +30 -0
- data/lib/instructions/code/code_nth_point.rb +21 -0
- data/lib/instructions/code/code_null_q.rb +15 -0
- data/lib/instructions/code/code_parses_q.rb +15 -0
- data/lib/instructions/code/code_points.rb +19 -0
- data/lib/instructions/code/code_pop.rb +6 -0
- data/lib/instructions/code/code_position.rb +22 -0
- data/lib/instructions/code/code_quote.rb +14 -0
- data/lib/instructions/code/code_replace_nth_point.rb +30 -0
- data/lib/instructions/code/code_rotate.rb +6 -0
- data/lib/instructions/code/code_shove.rb +6 -0
- data/lib/instructions/code/code_swap.rb +6 -0
- data/lib/instructions/code/code_yank.rb +6 -0
- data/lib/instructions/code/code_yankdup.rb +6 -0
- data/lib/instructions/conversion/bool_from_float.rb +14 -0
- data/lib/instructions/conversion/bool_from_int.rb +14 -0
- data/lib/instructions/conversion/code_from_bool.rb +16 -0
- data/lib/instructions/conversion/code_from_float.rb +16 -0
- data/lib/instructions/conversion/code_from_int.rb +17 -0
- data/lib/instructions/conversion/code_from_name.rb +16 -0
- data/lib/instructions/conversion/float_from_bool.rb +14 -0
- data/lib/instructions/conversion/float_from_int.rb +14 -0
- data/lib/instructions/conversion/int_from_bool.rb +14 -0
- data/lib/instructions/conversion/int_from_float.rb +14 -0
- data/lib/instructions/exec/exec_define.rb +6 -0
- data/lib/instructions/exec/exec_depth.rb +6 -0
- data/lib/instructions/exec/exec_do_count.rb +23 -0
- data/lib/instructions/exec/exec_do_range.rb +36 -0
- data/lib/instructions/exec/exec_do_times.rb +34 -0
- data/lib/instructions/exec/exec_duplicate.rb +6 -0
- data/lib/instructions/exec/exec_equal_q.rb +17 -0
- data/lib/instructions/exec/exec_flush.rb +6 -0
- data/lib/instructions/exec/exec_if.rb +8 -0
- data/lib/instructions/exec/exec_k.rb +14 -0
- data/lib/instructions/exec/exec_pop.rb +6 -0
- data/lib/instructions/exec/exec_rotate.rb +6 -0
- data/lib/instructions/exec/exec_s.rb +18 -0
- data/lib/instructions/exec/exec_shove.rb +6 -0
- data/lib/instructions/exec/exec_swap.rb +6 -0
- data/lib/instructions/exec/exec_y.rb +15 -0
- data/lib/instructions/exec/exec_yank.rb +6 -0
- data/lib/instructions/exec/exec_yankdup.rb +6 -0
- data/lib/instructions/float/float_abs.rb +14 -0
- data/lib/instructions/float/float_add.rb +15 -0
- data/lib/instructions/float/float_cosine.rb +14 -0
- data/lib/instructions/float/float_define.rb +6 -0
- data/lib/instructions/float/float_depth.rb +6 -0
- data/lib/instructions/float/float_divide.rb +20 -0
- data/lib/instructions/float/float_duplicate.rb +6 -0
- data/lib/instructions/float/float_equal_q.rb +15 -0
- data/lib/instructions/float/float_flush.rb +6 -0
- data/lib/instructions/float/float_greater_than_q.rb +15 -0
- data/lib/instructions/float/float_if.rb +8 -0
- data/lib/instructions/float/float_less_than_q.rb +15 -0
- data/lib/instructions/float/float_max.rb +15 -0
- data/lib/instructions/float/float_min.rb +15 -0
- data/lib/instructions/float/float_modulo.rb +20 -0
- data/lib/instructions/float/float_multiply.rb +15 -0
- data/lib/instructions/float/float_negative.rb +14 -0
- data/lib/instructions/float/float_pop.rb +6 -0
- data/lib/instructions/float/float_power.rb +20 -0
- data/lib/instructions/float/float_random.rb +13 -0
- data/lib/instructions/float/float_rotate.rb +6 -0
- data/lib/instructions/float/float_shove.rb +6 -0
- data/lib/instructions/float/float_sine.rb +14 -0
- data/lib/instructions/float/float_sqrt.rb +18 -0
- data/lib/instructions/float/float_subtract.rb +15 -0
- data/lib/instructions/float/float_swap.rb +6 -0
- data/lib/instructions/float/float_tangent.rb +14 -0
- data/lib/instructions/float/float_yank.rb +6 -0
- data/lib/instructions/float/float_yankdup.rb +6 -0
- data/lib/instructions/infrastructure.rb +335 -17
- data/lib/instructions/int/int_abs.rb +14 -0
- data/lib/instructions/int/int_add.rb +15 -0
- data/lib/instructions/int/int_define.rb +6 -0
- data/lib/instructions/int/int_depth.rb +6 -0
- data/lib/instructions/int/int_divide.rb +20 -0
- data/lib/instructions/int/int_duplicate.rb +6 -0
- data/lib/instructions/int/int_equal_q.rb +15 -0
- data/lib/instructions/int/int_flush.rb +6 -0
- data/lib/instructions/int/int_greater_than_q.rb +15 -0
- data/lib/instructions/int/int_if.rb +8 -0
- data/lib/instructions/int/int_less_than_q.rb +15 -0
- data/lib/instructions/int/int_max.rb +16 -0
- data/lib/instructions/int/int_min.rb +16 -0
- data/lib/instructions/int/int_modulo.rb +20 -0
- data/lib/instructions/int/int_multiply.rb +15 -0
- data/lib/instructions/int/int_negative.rb +14 -0
- data/lib/instructions/int/int_pop.rb +6 -0
- data/lib/instructions/int/int_power.rb +16 -0
- data/lib/instructions/int/int_random.rb +13 -0
- data/lib/instructions/int/int_rotate.rb +6 -0
- data/lib/instructions/int/int_shove.rb +6 -0
- data/lib/instructions/int/int_subtract.rb +16 -0
- data/lib/instructions/int/int_swap.rb +6 -0
- data/lib/instructions/int/int_yank.rb +6 -0
- data/lib/instructions/int/int_yankdup.rb +6 -0
- data/lib/instructions/name/name_depth.rb +6 -0
- data/lib/instructions/name/name_disable_lookup.rb +12 -0
- data/lib/instructions/name/name_duplicate.rb +6 -0
- data/lib/instructions/name/name_equal_q.rb +15 -0
- data/lib/instructions/name/name_flush.rb +6 -0
- data/lib/instructions/name/name_next.rb +14 -0
- data/lib/instructions/name/name_pop.rb +6 -0
- data/lib/instructions/name/name_random_bound.rb +14 -0
- data/lib/instructions/name/name_rotate.rb +6 -0
- data/lib/instructions/name/name_shove.rb +6 -0
- data/lib/instructions/name/name_swap.rb +6 -0
- data/lib/instructions/name/name_unbind.rb +17 -0
- data/lib/instructions/name/name_yank.rb +6 -0
- data/lib/instructions/name/name_yankdup.rb +6 -0
- data/lib/interpreter/grammars/nudge_codeblock.treetop +17 -0
- data/lib/interpreter/grammars/nudge_codeblock_helpers.rb +19 -0
- data/lib/interpreter/grammars/nudge_common.treetop +15 -0
- data/lib/interpreter/grammars/nudge_instruction.treetop +14 -0
- data/lib/interpreter/grammars/nudge_instruction_helpers.rb +14 -0
- data/lib/interpreter/grammars/nudge_reference.treetop +9 -0
- data/lib/interpreter/grammars/nudge_reference_helpers.rb +14 -0
- data/lib/interpreter/grammars/nudge_value.treetop +14 -0
- data/lib/interpreter/grammars/nudge_value_helpers.rb +19 -0
- data/lib/interpreter/interpreter.rb +74 -23
- data/lib/interpreter/nudge_program.rb +253 -0
- data/lib/interpreter/parse.tab.rb +264 -0
- data/lib/interpreter/programPoints.rb +119 -98
- data/lib/interpreter/types/codeType.rb +114 -89
- data/lib/interpreter/types/pushTypes.rb +33 -20
- data/lib/nudge.rb +25 -26
- data/readme.md +13 -10
- data/spec/fixtures/long_arithmetic.example +7 -4
- data/spec/instructions/bool/bool_and_spec.rb +61 -0
- data/spec/instructions/bool/bool_define_spec.rb +69 -0
- data/spec/instructions/bool/bool_depth_spec.rb +39 -0
- data/spec/instructions/bool/bool_equal_q_spec.rb +61 -0
- data/spec/instructions/bool/bool_flush_spec.rb +37 -0
- data/spec/instructions/bool/bool_not_spec.rb +61 -0
- data/spec/instructions/bool/bool_or_spec.rb +61 -0
- data/spec/instructions/bool/bool_random_spec.rb +39 -0
- data/spec/instructions/bool/bool_shove_spec.rb +69 -0
- data/spec/instructions/bool/bool_xor_spec.rb +61 -0
- data/spec/instructions/bool/bool_yank_spec.rb +71 -0
- data/spec/instructions/bool/bool_yankdup_spec.rb +70 -0
- data/spec/instructions/code/code_atom_q_spec.rb +44 -0
- data/spec/instructions/code/code_backbone_points_spec.rb +57 -0
- data/spec/instructions/code/code_car_spec.rb +50 -0
- data/spec/instructions/code/code_cdr_spec.rb +51 -0
- data/spec/instructions/code/code_concatenate_spec.rb +81 -0
- data/spec/instructions/code/code_cons_spec.rb +63 -0
- data/spec/instructions/code/code_container_spec.rb +77 -0
- data/spec/instructions/code/code_contains_q_spec.rb +82 -0
- data/spec/instructions/code/code_define_spec.rb +76 -0
- data/spec/instructions/code/code_discrepancy_spec.rb +81 -0
- data/spec/instructions/code/code_do_count_spec.rb +83 -0
- data/spec/instructions/code/code_do_range_spec.rb +113 -0
- data/spec/instructions/code/code_do_times_spec.rb +116 -0
- data/spec/instructions/code/code_equal_q_spec.rb +49 -0
- data/spec/instructions/code/code_execute_spec.rb +52 -0
- data/spec/instructions/code/code_execute_then_pop_spec.rb +61 -0
- data/spec/instructions/code/code_fromname_spec.rb +37 -0
- data/spec/instructions/code/code_gsub_spec.rb +112 -0
- data/spec/instructions/code/code_if_spec.rb +53 -0
- data/spec/instructions/code/code_instructions_spec.rb +42 -0
- data/spec/instructions/code/code_list_spec.rb +49 -0
- data/spec/instructions/code/code_member_q_spec.rb +77 -0
- data/spec/instructions/code/code_name_lookup_spec.rb +65 -0
- data/spec/instructions/code/code_noop_spec.rb +38 -0
- data/spec/instructions/code/code_nth_cdr_spec.rb +77 -0
- data/spec/instructions/code/code_nth_point_spec.rb +67 -0
- data/spec/instructions/code/code_nth_spec.rb +62 -0
- data/spec/instructions/code/code_null_q_spec.rb +44 -0
- data/spec/instructions/code/code_parses_q_spec.rb +73 -0
- data/spec/instructions/code/code_points_spec.rb +49 -0
- data/spec/instructions/code/code_position_spec.rb +74 -0
- data/spec/instructions/code/code_quote_spec.rb +53 -0
- data/spec/instructions/code/code_replace_nth_point_spec.rb +115 -0
- data/spec/instructions/code/code_stack_spec.rb +386 -0
- data/spec/instructions/exec/exec_define_spec.rb +70 -0
- data/spec/instructions/exec/exec_depth_spec.rb +39 -0
- data/spec/instructions/exec/exec_do_count_spec.rb +79 -0
- data/spec/instructions/exec/exec_do_range_spec.rb +98 -0
- data/spec/instructions/exec/exec_do_times_spec.rb +105 -0
- data/spec/instructions/exec/exec_duplicate_spec.rb +44 -0
- data/spec/instructions/exec/exec_equal_q_spec.rb +50 -0
- data/spec/instructions/exec/exec_flush_spec.rb +37 -0
- data/spec/instructions/exec/exec_if_spec.rb +51 -0
- data/spec/instructions/exec/exec_k_spec.rb +39 -0
- data/spec/instructions/exec/exec_pop_spec.rb +38 -0
- data/spec/instructions/exec/exec_rotate_spec.rb +40 -0
- data/spec/instructions/exec/exec_s_spec.rb +41 -0
- data/spec/instructions/exec/exec_shove_spec.rb +68 -0
- data/spec/instructions/exec/exec_swap_spec.rb +41 -0
- data/spec/instructions/exec/exec_y_spec.rb +41 -0
- data/spec/instructions/exec/exec_yank_spec.rb +66 -0
- data/spec/instructions/exec/exec_yankdup_spec.rb +69 -0
- data/spec/instructions/float/float_abs_spec.rb +50 -0
- data/spec/instructions/float/float_add_spec.rb +50 -0
- data/spec/instructions/float/float_cosine_spec.rb +61 -0
- data/spec/instructions/float/float_define_spec.rb +69 -0
- data/spec/instructions/float/float_depth_spec.rb +39 -0
- data/spec/instructions/float/float_divide_spec.rb +59 -0
- data/spec/instructions/float/float_equal_q_spec.rb +53 -0
- data/spec/instructions/float/float_flush_spec.rb +37 -0
- data/spec/instructions/float/float_greater_than_q_spec.rb +59 -0
- data/spec/instructions/float/float_if_spec.rb +49 -0
- data/spec/instructions/float/float_less_than_q_spec.rb +59 -0
- data/spec/instructions/float/float_max_spec.rb +51 -0
- data/spec/instructions/float/float_min_spec.rb +51 -0
- data/spec/instructions/float/float_modulo_spec.rb +59 -0
- data/spec/instructions/float/float_multiply_spec.rb +51 -0
- data/spec/instructions/float/float_negative_spec.rb +51 -0
- data/spec/instructions/float/float_power_spec.rb +59 -0
- data/spec/instructions/float/float_random_spec.rb +36 -0
- data/spec/instructions/float/float_shove_spec.rb +67 -0
- data/spec/instructions/float/float_sine_spec.rb +61 -0
- data/spec/instructions/float/float_sqrt_spec.rb +60 -0
- data/spec/instructions/float/float_subtract_spec.rb +51 -0
- data/spec/instructions/float/float_tangent_spec.rb +62 -0
- data/spec/instructions/float/float_yank_spec.rb +65 -0
- data/spec/instructions/float/float_yankdup_spec.rb +70 -0
- data/spec/instructions/instruction_class_spec.rb +31 -0
- data/spec/instructions/int/int_abs_spec.rb +61 -0
- data/spec/instructions/int/int_add_spec.rb +60 -0
- data/spec/instructions/int/int_define_spec.rb +73 -0
- data/spec/instructions/int/int_depth_spec.rb +37 -0
- data/spec/instructions/int/int_divide_spec.rb +69 -0
- data/spec/instructions/int/int_equal_q_spec.rb +52 -0
- data/spec/instructions/int/int_flush_spec.rb +37 -0
- data/spec/instructions/int/int_greater_than_q_spec.rb +59 -0
- data/spec/instructions/int/int_if_spec.rb +48 -0
- data/spec/instructions/int/int_less_than_q_spec.rb +59 -0
- data/spec/instructions/int/int_max_spec.rb +61 -0
- data/spec/instructions/int/int_min_spec.rb +61 -0
- data/spec/instructions/int/int_modulo_spec.rb +69 -0
- data/spec/instructions/int/int_multiply_spec.rb +61 -0
- data/spec/instructions/int/int_negative_spec.rb +61 -0
- data/spec/instructions/int/int_power_spec.rb +73 -0
- data/spec/instructions/int/int_random_spec.rb +36 -0
- data/spec/instructions/int/int_shove_spec.rb +67 -0
- data/spec/instructions/int/int_subtract_spec.rb +61 -0
- data/spec/instructions/int/int_yank_spec.rb +85 -0
- data/spec/instructions/int/int_yankdup_spec.rb +70 -0
- data/spec/instructions/name/name_depth_spec.rb +39 -0
- data/spec/instructions/name/name_disable_lookup_spec.rb +47 -0
- data/spec/instructions/name/name_equal_q_spec.rb +38 -0
- data/spec/instructions/name/name_flush_spec.rb +37 -0
- data/spec/instructions/name/name_next_spec.rb +39 -0
- data/spec/instructions/name/name_random_bound_spec.rb +57 -0
- data/spec/instructions/name/name_shove_spec.rb +67 -0
- data/spec/instructions/name/name_unbind_spec.rb +62 -0
- data/spec/instructions/name/name_yank_spec.rb +65 -0
- data/spec/instructions/name/name_yankdup_spec.rb +69 -0
- data/spec/instructions/split_these/bool_stack_spec.rb +95 -0
- data/spec/instructions/split_these/conversions_spec.rb +103 -0
- data/spec/instructions/split_these/float_stack_spec.rb +92 -0
- data/spec/instructions/split_these/int_stack_spec.rb +81 -0
- data/spec/instructions/split_these/name_stack_spec.rb +84 -0
- data/spec/interpreter/codeblock_point_spec.rb +164 -0
- data/spec/interpreter/codetype_spec.rb +219 -185
- data/spec/interpreter/instruction_spec.rb +87 -25
- data/spec/interpreter/interpreter_spec.rb +230 -36
- data/spec/interpreter/nil_point_spec.rb +32 -0
- data/spec/interpreter/nudge_program_spec.rb +774 -0
- data/spec/interpreter/reference_point_spec.rb +73 -0
- data/spec/interpreter/stack_spec.rb +1 -1
- data/spec/interpreter/treetophelpers.rb +94 -1
- data/spec/interpreter/types_spec.rb +125 -77
- data/spec/interpreter/value_point_spec.rb +173 -0
- data/spec/parsers/nudge_program_parser_spec.rb +86 -0
- data/spec/spec_helper.rb +26 -2
- metadata +464 -664
- data/_spikes/couch_document_spike.rb +0 -24
- data/_spikes/nested_parsing/nested.treetop +0 -6
- data/_spikes/nudge3_syntax_spike.txt +0 -23
- data/_spikes/nudgeview/init.rb +0 -19
- data/_spikes/nudgeview/public/javascripts/app.js +0 -12
- data/_spikes/nudgeview/public/javascripts/jquery.js +0 -4376
- data/_spikes/nudgeview/public/javascripts/jquery.svg.js +0 -1325
- data/_spikes/nudgeview/views/index.erb +0 -18
- data/_spikes/nudgeview/views/index.haml +0 -8
- data/_spikes/simplestWeb/simplest.rb +0 -44
- data/_spikes/simplestWeb/views/main.erb +0 -19
- data/_spikes/sketches/nudgecode_spike.rb +0 -146
- data/_spikes/sketches/searchDSL_spike.rb +0 -25
- data/_spikes/sketches/search_operator_sketch_spike.txt +0 -287
- data/_spikes/sketches/searchspace_spike.rb +0 -96
- data/_spikes/symbolic_regression/activate.rb +0 -35
- data/_spikes/symbolic_regression/config/environment.rb +0 -340
- data/_spikes/symbolic_regression/config/environments/deployment.rb +0 -0
- data/_spikes/symbolic_regression/config/environments/development.rb +0 -0
- data/_spikes/symbolic_regression/experiment/objectives/programLength.rb +0 -2
- data/_spikes/symbolic_regression/experiment/objectives/summedSquaredError.rb +0 -2
- data/_spikes/symbolic_regression/lib/tasks/run.rake +0 -0
- data/app_generators/nudge/USAGE +0 -5
- data/app_generators/nudge/nudge_generator.rb +0 -73
- data/app_generators/nudge/templates/activate.rb +0 -0
- data/bin/nudge +0 -17
- data/doc/classes/BlockNode.html +0 -146
- data/doc/classes/BlockNode.src/M000246.html +0 -18
- data/doc/classes/BoolAndInstruction.html +0 -218
- data/doc/classes/BoolAndInstruction.src/M000003.html +0 -15
- data/doc/classes/BoolAndInstruction.src/M000004.html +0 -16
- data/doc/classes/BoolAndInstruction.src/M000005.html +0 -15
- data/doc/classes/BoolAndInstruction.src/M000006.html +0 -15
- data/doc/classes/BoolEqualQInstruction.html +0 -218
- data/doc/classes/BoolEqualQInstruction.src/M000015.html +0 -15
- data/doc/classes/BoolEqualQInstruction.src/M000016.html +0 -16
- data/doc/classes/BoolEqualQInstruction.src/M000017.html +0 -15
- data/doc/classes/BoolEqualQInstruction.src/M000018.html +0 -15
- data/doc/classes/BoolFromFloatInstruction.html +0 -218
- data/doc/classes/BoolFromFloatInstruction.src/M000071.html +0 -15
- data/doc/classes/BoolFromFloatInstruction.src/M000072.html +0 -15
- data/doc/classes/BoolFromFloatInstruction.src/M000073.html +0 -15
- data/doc/classes/BoolFromFloatInstruction.src/M000074.html +0 -15
- data/doc/classes/BoolFromIntInstruction.html +0 -218
- data/doc/classes/BoolFromIntInstruction.src/M000067.html +0 -15
- data/doc/classes/BoolFromIntInstruction.src/M000068.html +0 -15
- data/doc/classes/BoolFromIntInstruction.src/M000069.html +0 -15
- data/doc/classes/BoolFromIntInstruction.src/M000070.html +0 -15
- data/doc/classes/BoolNotInstruction.html +0 -218
- data/doc/classes/BoolNotInstruction.src/M000019.html +0 -15
- data/doc/classes/BoolNotInstruction.src/M000020.html +0 -15
- data/doc/classes/BoolNotInstruction.src/M000021.html +0 -15
- data/doc/classes/BoolNotInstruction.src/M000022.html +0 -15
- data/doc/classes/BoolOrInstruction.html +0 -218
- data/doc/classes/BoolOrInstruction.src/M000007.html +0 -15
- data/doc/classes/BoolOrInstruction.src/M000008.html +0 -16
- data/doc/classes/BoolOrInstruction.src/M000009.html +0 -15
- data/doc/classes/BoolOrInstruction.src/M000010.html +0 -15
- data/doc/classes/BoolRandomInstruction.html +0 -218
- data/doc/classes/BoolRandomInstruction.src/M000187.html +0 -15
- data/doc/classes/BoolRandomInstruction.src/M000188.html +0 -14
- data/doc/classes/BoolRandomInstruction.src/M000189.html +0 -15
- data/doc/classes/BoolRandomInstruction.src/M000190.html +0 -15
- data/doc/classes/BoolType.html +0 -196
- data/doc/classes/BoolType.src/M000240.html +0 -16
- data/doc/classes/BoolType.src/M000241.html +0 -15
- data/doc/classes/BoolType.src/M000242.html +0 -15
- data/doc/classes/BoolXorInstruction.html +0 -218
- data/doc/classes/BoolXorInstruction.src/M000011.html +0 -15
- data/doc/classes/BoolXorInstruction.src/M000012.html +0 -16
- data/doc/classes/BoolXorInstruction.src/M000013.html +0 -15
- data/doc/classes/BoolXorInstruction.src/M000014.html +0 -15
- data/doc/classes/ChannelNode.html +0 -161
- data/doc/classes/ChannelNode.src/M000249.html +0 -15
- data/doc/classes/ChannelNode.src/M000250.html +0 -16
- data/doc/classes/CodeType.html +0 -269
- data/doc/classes/CodeType.src/M000219.html +0 -38
- data/doc/classes/CodeType.src/M000220.html +0 -16
- data/doc/classes/CodeType.src/M000221.html +0 -16
- data/doc/classes/CodeType.src/M000222.html +0 -16
- data/doc/classes/CodeType.src/M000223.html +0 -24
- data/doc/classes/CodeType.src/M000224.html +0 -42
- data/doc/classes/ERCNode.html +0 -183
- data/doc/classes/ERCNode.src/M000254.html +0 -15
- data/doc/classes/ERCNode.src/M000255.html +0 -16
- data/doc/classes/ERCNode.src/M000256.html +0 -16
- data/doc/classes/ExecPopInstruction.html +0 -218
- data/doc/classes/ExecPopInstruction.src/M000075.html +0 -15
- data/doc/classes/ExecPopInstruction.src/M000076.html +0 -14
- data/doc/classes/ExecPopInstruction.src/M000077.html +0 -15
- data/doc/classes/ExecPopInstruction.src/M000078.html +0 -14
- data/doc/classes/FloatAbsInstruction.html +0 -218
- data/doc/classes/FloatAbsInstruction.src/M000107.html +0 -15
- data/doc/classes/FloatAbsInstruction.src/M000108.html +0 -15
- data/doc/classes/FloatAbsInstruction.src/M000109.html +0 -15
- data/doc/classes/FloatAbsInstruction.src/M000110.html +0 -15
- data/doc/classes/FloatAddInstruction.html +0 -218
- data/doc/classes/FloatAddInstruction.src/M000079.html +0 -15
- data/doc/classes/FloatAddInstruction.src/M000080.html +0 -16
- data/doc/classes/FloatAddInstruction.src/M000081.html +0 -15
- data/doc/classes/FloatAddInstruction.src/M000082.html +0 -15
- data/doc/classes/FloatCosineInstruction.html +0 -218
- data/doc/classes/FloatCosineInstruction.src/M000123.html +0 -15
- data/doc/classes/FloatCosineInstruction.src/M000124.html +0 -15
- data/doc/classes/FloatCosineInstruction.src/M000125.html +0 -15
- data/doc/classes/FloatCosineInstruction.src/M000126.html +0 -15
- data/doc/classes/FloatDivideInstruction.html +0 -218
- data/doc/classes/FloatDivideInstruction.src/M000091.html +0 -15
- data/doc/classes/FloatDivideInstruction.src/M000092.html +0 -16
- data/doc/classes/FloatDivideInstruction.src/M000093.html +0 -20
- data/doc/classes/FloatDivideInstruction.src/M000094.html +0 -15
- data/doc/classes/FloatFromBoolInstruction.html +0 -218
- data/doc/classes/FloatFromBoolInstruction.src/M000055.html +0 -15
- data/doc/classes/FloatFromBoolInstruction.src/M000056.html +0 -15
- data/doc/classes/FloatFromBoolInstruction.src/M000057.html +0 -15
- data/doc/classes/FloatFromBoolInstruction.src/M000058.html +0 -15
- data/doc/classes/FloatFromIntInstruction.html +0 -218
- data/doc/classes/FloatFromIntInstruction.src/M000063.html +0 -15
- data/doc/classes/FloatFromIntInstruction.src/M000064.html +0 -15
- data/doc/classes/FloatFromIntInstruction.src/M000065.html +0 -15
- data/doc/classes/FloatFromIntInstruction.src/M000066.html +0 -15
- data/doc/classes/FloatGreaterThanQInstruction.html +0 -218
- data/doc/classes/FloatGreaterThanQInstruction.src/M000035.html +0 -15
- data/doc/classes/FloatGreaterThanQInstruction.src/M000036.html +0 -16
- data/doc/classes/FloatGreaterThanQInstruction.src/M000037.html +0 -15
- data/doc/classes/FloatGreaterThanQInstruction.src/M000038.html +0 -15
- data/doc/classes/FloatIfInstruction.html +0 -218
- data/doc/classes/FloatIfInstruction.src/M000047.html +0 -16
- data/doc/classes/FloatIfInstruction.src/M000048.html +0 -15
- data/doc/classes/FloatIfInstruction.src/M000049.html +0 -14
- data/doc/classes/FloatIfInstruction.src/M000050.html +0 -17
- data/doc/classes/FloatLessThanQInstruction.html +0 -218
- data/doc/classes/FloatLessThanQInstruction.src/M000039.html +0 -15
- data/doc/classes/FloatLessThanQInstruction.src/M000040.html +0 -16
- data/doc/classes/FloatLessThanQInstruction.src/M000041.html +0 -15
- data/doc/classes/FloatLessThanQInstruction.src/M000042.html +0 -15
- data/doc/classes/FloatMaxInstruction.html +0 -218
- data/doc/classes/FloatMaxInstruction.src/M000095.html +0 -15
- data/doc/classes/FloatMaxInstruction.src/M000096.html +0 -16
- data/doc/classes/FloatMaxInstruction.src/M000097.html +0 -15
- data/doc/classes/FloatMaxInstruction.src/M000098.html +0 -15
- data/doc/classes/FloatMinInstruction.html +0 -218
- data/doc/classes/FloatMinInstruction.src/M000099.html +0 -15
- data/doc/classes/FloatMinInstruction.src/M000100.html +0 -16
- data/doc/classes/FloatMinInstruction.src/M000101.html +0 -15
- data/doc/classes/FloatMinInstruction.src/M000102.html +0 -15
- data/doc/classes/FloatMultiplyInstruction.html +0 -218
- data/doc/classes/FloatMultiplyInstruction.src/M000083.html +0 -15
- data/doc/classes/FloatMultiplyInstruction.src/M000084.html +0 -16
- data/doc/classes/FloatMultiplyInstruction.src/M000085.html +0 -15
- data/doc/classes/FloatMultiplyInstruction.src/M000086.html +0 -15
- data/doc/classes/FloatNegativeInstruction.html +0 -218
- data/doc/classes/FloatNegativeInstruction.src/M000103.html +0 -15
- data/doc/classes/FloatNegativeInstruction.src/M000104.html +0 -15
- data/doc/classes/FloatNegativeInstruction.src/M000105.html +0 -15
- data/doc/classes/FloatNegativeInstruction.src/M000106.html +0 -15
- data/doc/classes/FloatPowerInstruction.html +0 -218
- data/doc/classes/FloatPowerInstruction.src/M000111.html +0 -15
- data/doc/classes/FloatPowerInstruction.src/M000112.html +0 -16
- data/doc/classes/FloatPowerInstruction.src/M000113.html +0 -20
- data/doc/classes/FloatPowerInstruction.src/M000114.html +0 -15
- data/doc/classes/FloatRandomInstruction.html +0 -218
- data/doc/classes/FloatRandomInstruction.src/M000191.html +0 -15
- data/doc/classes/FloatRandomInstruction.src/M000192.html +0 -14
- data/doc/classes/FloatRandomInstruction.src/M000193.html +0 -15
- data/doc/classes/FloatRandomInstruction.src/M000194.html +0 -15
- data/doc/classes/FloatSineInstruction.html +0 -218
- data/doc/classes/FloatSineInstruction.src/M000119.html +0 -15
- data/doc/classes/FloatSineInstruction.src/M000120.html +0 -15
- data/doc/classes/FloatSineInstruction.src/M000121.html +0 -15
- data/doc/classes/FloatSineInstruction.src/M000122.html +0 -15
- data/doc/classes/FloatSqrtInstruction.html +0 -218
- data/doc/classes/FloatSqrtInstruction.src/M000115.html +0 -15
- data/doc/classes/FloatSqrtInstruction.src/M000116.html +0 -15
- data/doc/classes/FloatSqrtInstruction.src/M000117.html +0 -19
- data/doc/classes/FloatSqrtInstruction.src/M000118.html +0 -15
- data/doc/classes/FloatSubtractInstruction.html +0 -218
- data/doc/classes/FloatSubtractInstruction.src/M000087.html +0 -15
- data/doc/classes/FloatSubtractInstruction.src/M000088.html +0 -16
- data/doc/classes/FloatSubtractInstruction.src/M000089.html +0 -15
- data/doc/classes/FloatSubtractInstruction.src/M000090.html +0 -15
- data/doc/classes/FloatTangentInstruction.html +0 -218
- data/doc/classes/FloatTangentInstruction.src/M000127.html +0 -15
- data/doc/classes/FloatTangentInstruction.src/M000128.html +0 -15
- data/doc/classes/FloatTangentInstruction.src/M000129.html +0 -15
- data/doc/classes/FloatTangentInstruction.src/M000130.html +0 -15
- data/doc/classes/FloatType.html +0 -196
- data/doc/classes/FloatType.src/M000243.html +0 -19
- data/doc/classes/FloatType.src/M000244.html +0 -15
- data/doc/classes/FloatType.src/M000245.html +0 -15
- data/doc/classes/Helpers.html +0 -161
- data/doc/classes/Helpers.src/M000343.html +0 -21
- data/doc/classes/Helpers.src/M000344.html +0 -24
- data/doc/classes/Instruction/InstructionMethodError.html +0 -110
- data/doc/classes/Instruction/NaNResultError.html +0 -110
- data/doc/classes/Instruction/NotEnoughStackItems.html +0 -110
- data/doc/classes/Instruction.html +0 -500
- data/doc/classes/Instruction.src/M000131.html +0 -17
- data/doc/classes/Instruction.src/M000132.html +0 -15
- data/doc/classes/Instruction.src/M000133.html +0 -15
- data/doc/classes/Instruction.src/M000134.html +0 -15
- data/doc/classes/Instruction.src/M000135.html +0 -15
- data/doc/classes/Instruction.src/M000136.html +0 -15
- data/doc/classes/Instruction.src/M000137.html +0 -15
- data/doc/classes/Instruction.src/M000138.html +0 -15
- data/doc/classes/Instruction.src/M000139.html +0 -22
- data/doc/classes/Instruction.src/M000140.html +0 -15
- data/doc/classes/Instruction.src/M000141.html +0 -25
- data/doc/classes/Instruction.src/M000142.html +0 -15
- data/doc/classes/Instruction.src/M000143.html +0 -15
- data/doc/classes/Instruction.src/M000144.html +0 -15
- data/doc/classes/Instruction.src/M000145.html +0 -15
- data/doc/classes/Instruction.src/M000146.html +0 -15
- data/doc/classes/InstructionNode.html +0 -161
- data/doc/classes/InstructionNode.src/M000247.html +0 -15
- data/doc/classes/InstructionNode.src/M000248.html +0 -16
- data/doc/classes/IntAbsInstruction.html +0 -218
- data/doc/classes/IntAbsInstruction.src/M000175.html +0 -15
- data/doc/classes/IntAbsInstruction.src/M000176.html +0 -15
- data/doc/classes/IntAbsInstruction.src/M000177.html +0 -15
- data/doc/classes/IntAbsInstruction.src/M000178.html +0 -15
- data/doc/classes/IntAddInstruction.html +0 -218
- data/doc/classes/IntAddInstruction.src/M000147.html +0 -15
- data/doc/classes/IntAddInstruction.src/M000148.html +0 -16
- data/doc/classes/IntAddInstruction.src/M000149.html +0 -15
- data/doc/classes/IntAddInstruction.src/M000150.html +0 -15
- data/doc/classes/IntDepthInstruction.html +0 -218
- data/doc/classes/IntDepthInstruction.src/M000211.html +0 -15
- data/doc/classes/IntDepthInstruction.src/M000212.html +0 -14
- data/doc/classes/IntDepthInstruction.src/M000213.html +0 -15
- data/doc/classes/IntDepthInstruction.src/M000214.html +0 -15
- data/doc/classes/IntDivideInstruction.html +0 -218
- data/doc/classes/IntDivideInstruction.src/M000155.html +0 -15
- data/doc/classes/IntDivideInstruction.src/M000156.html +0 -16
- data/doc/classes/IntDivideInstruction.src/M000157.html +0 -20
- data/doc/classes/IntDivideInstruction.src/M000158.html +0 -15
- data/doc/classes/IntDuplicateInstruction.html +0 -218
- data/doc/classes/IntDuplicateInstruction.src/M000203.html +0 -15
- data/doc/classes/IntDuplicateInstruction.src/M000204.html +0 -15
- data/doc/classes/IntDuplicateInstruction.src/M000205.html +0 -15
- data/doc/classes/IntDuplicateInstruction.src/M000206.html +0 -15
- data/doc/classes/IntEqualQInstruction.html +0 -218
- data/doc/classes/IntEqualQInstruction.src/M000023.html +0 -15
- data/doc/classes/IntEqualQInstruction.src/M000024.html +0 -16
- data/doc/classes/IntEqualQInstruction.src/M000025.html +0 -15
- data/doc/classes/IntEqualQInstruction.src/M000026.html +0 -15
- data/doc/classes/IntFlushInstruction.html +0 -218
- data/doc/classes/IntFlushInstruction.src/M000215.html +0 -15
- data/doc/classes/IntFlushInstruction.src/M000216.html +0 -14
- data/doc/classes/IntFlushInstruction.src/M000217.html +0 -14
- data/doc/classes/IntFlushInstruction.src/M000218.html +0 -15
- data/doc/classes/IntFromBoolInstruction.html +0 -218
- data/doc/classes/IntFromBoolInstruction.src/M000051.html +0 -15
- data/doc/classes/IntFromBoolInstruction.src/M000052.html +0 -15
- data/doc/classes/IntFromBoolInstruction.src/M000053.html +0 -15
- data/doc/classes/IntFromBoolInstruction.src/M000054.html +0 -15
- data/doc/classes/IntFromFloatInstruction.html +0 -218
- data/doc/classes/IntFromFloatInstruction.src/M000059.html +0 -15
- data/doc/classes/IntFromFloatInstruction.src/M000060.html +0 -15
- data/doc/classes/IntFromFloatInstruction.src/M000061.html +0 -15
- data/doc/classes/IntFromFloatInstruction.src/M000062.html +0 -15
- data/doc/classes/IntGreaterThanQInstruction.html +0 -218
- data/doc/classes/IntGreaterThanQInstruction.src/M000031.html +0 -15
- data/doc/classes/IntGreaterThanQInstruction.src/M000032.html +0 -16
- data/doc/classes/IntGreaterThanQInstruction.src/M000033.html +0 -15
- data/doc/classes/IntGreaterThanQInstruction.src/M000034.html +0 -15
- data/doc/classes/IntIfInstruction.html +0 -218
- data/doc/classes/IntIfInstruction.src/M000043.html +0 -16
- data/doc/classes/IntIfInstruction.src/M000044.html +0 -15
- data/doc/classes/IntIfInstruction.src/M000045.html +0 -14
- data/doc/classes/IntIfInstruction.src/M000046.html +0 -17
- data/doc/classes/IntLessThanQInstruction.html +0 -218
- data/doc/classes/IntLessThanQInstruction.src/M000027.html +0 -15
- data/doc/classes/IntLessThanQInstruction.src/M000028.html +0 -16
- data/doc/classes/IntLessThanQInstruction.src/M000029.html +0 -15
- data/doc/classes/IntLessThanQInstruction.src/M000030.html +0 -15
- data/doc/classes/IntMaxInstruction.html +0 -218
- data/doc/classes/IntMaxInstruction.src/M000167.html +0 -15
- data/doc/classes/IntMaxInstruction.src/M000168.html +0 -16
- data/doc/classes/IntMaxInstruction.src/M000169.html +0 -16
- data/doc/classes/IntMaxInstruction.src/M000170.html +0 -15
- data/doc/classes/IntMinInstruction.html +0 -218
- data/doc/classes/IntMinInstruction.src/M000171.html +0 -15
- data/doc/classes/IntMinInstruction.src/M000172.html +0 -16
- data/doc/classes/IntMinInstruction.src/M000173.html +0 -16
- data/doc/classes/IntMinInstruction.src/M000174.html +0 -15
- data/doc/classes/IntModuloInstruction.html +0 -218
- data/doc/classes/IntModuloInstruction.src/M000163.html +0 -15
- data/doc/classes/IntModuloInstruction.src/M000164.html +0 -16
- data/doc/classes/IntModuloInstruction.src/M000165.html +0 -20
- data/doc/classes/IntModuloInstruction.src/M000166.html +0 -15
- data/doc/classes/IntMultiplyInstruction.html +0 -218
- data/doc/classes/IntMultiplyInstruction.src/M000151.html +0 -15
- data/doc/classes/IntMultiplyInstruction.src/M000152.html +0 -16
- data/doc/classes/IntMultiplyInstruction.src/M000153.html +0 -15
- data/doc/classes/IntMultiplyInstruction.src/M000154.html +0 -15
- data/doc/classes/IntNegativeInstruction.html +0 -218
- data/doc/classes/IntNegativeInstruction.src/M000179.html +0 -15
- data/doc/classes/IntNegativeInstruction.src/M000180.html +0 -15
- data/doc/classes/IntNegativeInstruction.src/M000181.html +0 -15
- data/doc/classes/IntNegativeInstruction.src/M000182.html +0 -15
- data/doc/classes/IntPopInstruction.html +0 -218
- data/doc/classes/IntPopInstruction.src/M000195.html +0 -15
- data/doc/classes/IntPopInstruction.src/M000196.html +0 -15
- data/doc/classes/IntPopInstruction.src/M000197.html +0 -14
- data/doc/classes/IntPopInstruction.src/M000198.html +0 -14
- data/doc/classes/IntRandomInstruction.html +0 -218
- data/doc/classes/IntRandomInstruction.src/M000183.html +0 -15
- data/doc/classes/IntRandomInstruction.src/M000184.html +0 -14
- data/doc/classes/IntRandomInstruction.src/M000185.html +0 -15
- data/doc/classes/IntRandomInstruction.src/M000186.html +0 -15
- data/doc/classes/IntRotateInstruction.html +0 -218
- data/doc/classes/IntRotateInstruction.src/M000207.html +0 -15
- data/doc/classes/IntRotateInstruction.src/M000208.html +0 -17
- data/doc/classes/IntRotateInstruction.src/M000209.html +0 -14
- data/doc/classes/IntRotateInstruction.src/M000210.html +0 -17
- data/doc/classes/IntSubtractInstruction.html +0 -218
- data/doc/classes/IntSubtractInstruction.src/M000159.html +0 -15
- data/doc/classes/IntSubtractInstruction.src/M000160.html +0 -16
- data/doc/classes/IntSubtractInstruction.src/M000161.html +0 -16
- data/doc/classes/IntSubtractInstruction.src/M000162.html +0 -15
- data/doc/classes/IntSwapInstruction.html +0 -218
- data/doc/classes/IntSwapInstruction.src/M000199.html +0 -15
- data/doc/classes/IntSwapInstruction.src/M000200.html +0 -16
- data/doc/classes/IntSwapInstruction.src/M000201.html +0 -14
- data/doc/classes/IntSwapInstruction.src/M000202.html +0 -16
- data/doc/classes/IntType.html +0 -240
- data/doc/classes/IntType.src/M000235.html +0 -15
- data/doc/classes/IntType.src/M000236.html +0 -15
- data/doc/classes/IntType.src/M000237.html +0 -18
- data/doc/classes/IntType.src/M000238.html +0 -15
- data/doc/classes/IntType.src/M000239.html +0 -15
- data/doc/classes/LiteralNode.html +0 -183
- data/doc/classes/LiteralNode.src/M000251.html +0 -15
- data/doc/classes/LiteralNode.src/M000252.html +0 -16
- data/doc/classes/LiteralNode.src/M000253.html +0 -16
- data/doc/classes/Nudge/Channel.html +0 -437
- data/doc/classes/Nudge/Channel.src/M000286.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000287.html +0 -19
- data/doc/classes/Nudge/Channel.src/M000288.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000289.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000290.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000291.html +0 -19
- data/doc/classes/Nudge/Channel.src/M000292.html +0 -19
- data/doc/classes/Nudge/Channel.src/M000293.html +0 -17
- data/doc/classes/Nudge/Channel.src/M000294.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000295.html +0 -20
- data/doc/classes/Nudge/Channel.src/M000296.html +0 -15
- data/doc/classes/Nudge/Channel.src/M000297.html +0 -17
- data/doc/classes/Nudge/Channel.src/M000298.html +0 -15
- data/doc/classes/Nudge/CodeBlock.html +0 -331
- data/doc/classes/Nudge/CodeBlock.src/M000263.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000264.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000265.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000266.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000267.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000268.html +0 -17
- data/doc/classes/Nudge/CodeBlock.src/M000269.html +0 -20
- data/doc/classes/Nudge/CodeBlock.src/M000270.html +0 -15
- data/doc/classes/Nudge/CodeBlock.src/M000271.html +0 -19
- data/doc/classes/Nudge/DeadLocation.html +0 -152
- data/doc/classes/Nudge/DeadLocation.src/M000334.html +0 -17
- data/doc/classes/Nudge/Erc.html +0 -335
- data/doc/classes/Nudge/Erc.src/M000278.html +0 -16
- data/doc/classes/Nudge/Erc.src/M000279.html +0 -15
- data/doc/classes/Nudge/Erc.src/M000280.html +0 -15
- data/doc/classes/Nudge/Erc.src/M000281.html +0 -15
- data/doc/classes/Nudge/Erc.src/M000282.html +0 -18
- data/doc/classes/Nudge/Erc.src/M000283.html +0 -15
- data/doc/classes/Nudge/Erc.src/M000284.html +0 -17
- data/doc/classes/Nudge/Erc.src/M000285.html +0 -15
- data/doc/classes/Nudge/Individual.html +0 -313
- data/doc/classes/Nudge/Individual.src/M000314.html +0 -21
- data/doc/classes/Nudge/Individual.src/M000315.html +0 -15
- data/doc/classes/Nudge/Individual.src/M000316.html +0 -15
- data/doc/classes/Nudge/Individual.src/M000317.html +0 -17
- data/doc/classes/Nudge/Individual.src/M000318.html +0 -25
- data/doc/classes/Nudge/InstructionPoint/InstructionNotFoundError.html +0 -110
- data/doc/classes/Nudge/InstructionPoint.html +0 -350
- data/doc/classes/Nudge/InstructionPoint.src/M000299.html +0 -15
- data/doc/classes/Nudge/InstructionPoint.src/M000300.html +0 -15
- data/doc/classes/Nudge/InstructionPoint.src/M000301.html +0 -17
- data/doc/classes/Nudge/InstructionPoint.src/M000302.html +0 -15
- data/doc/classes/Nudge/InstructionPoint.src/M000303.html +0 -17
- data/doc/classes/Nudge/InstructionPoint.src/M000304.html +0 -17
- data/doc/classes/Nudge/InstructionPoint.src/M000305.html +0 -17
- data/doc/classes/Nudge/InstructionPoint.src/M000306.html +0 -15
- data/doc/classes/Nudge/Interpreter.html +0 -369
- data/doc/classes/Nudge/Interpreter.src/M000257.html +0 -20
- data/doc/classes/Nudge/Interpreter.src/M000258.html +0 -19
- data/doc/classes/Nudge/Interpreter.src/M000259.html +0 -15
- data/doc/classes/Nudge/Interpreter.src/M000260.html +0 -19
- data/doc/classes/Nudge/Interpreter.src/M000261.html +0 -17
- data/doc/classes/Nudge/LiteralPoint.html +0 -291
- data/doc/classes/Nudge/LiteralPoint.src/M000272.html +0 -16
- data/doc/classes/Nudge/LiteralPoint.src/M000273.html +0 -15
- data/doc/classes/Nudge/LiteralPoint.src/M000274.html +0 -15
- data/doc/classes/Nudge/LiteralPoint.src/M000275.html +0 -18
- data/doc/classes/Nudge/LiteralPoint.src/M000276.html +0 -17
- data/doc/classes/Nudge/LiteralPoint.src/M000277.html +0 -15
- data/doc/classes/Nudge/Location.html +0 -525
- data/doc/classes/Nudge/Location.src/M000319.html +0 -19
- data/doc/classes/Nudge/Location.src/M000320.html +0 -15
- data/doc/classes/Nudge/Location.src/M000321.html +0 -26
- data/doc/classes/Nudge/Location.src/M000322.html +0 -15
- data/doc/classes/Nudge/Location.src/M000323.html +0 -20
- data/doc/classes/Nudge/Location.src/M000324.html +0 -16
- data/doc/classes/Nudge/Location.src/M000325.html +0 -25
- data/doc/classes/Nudge/Location.src/M000326.html +0 -15
- data/doc/classes/Nudge/Location.src/M000327.html +0 -21
- data/doc/classes/Nudge/Location.src/M000328.html +0 -16
- data/doc/classes/Nudge/Location.src/M000329.html +0 -15
- data/doc/classes/Nudge/Location.src/M000330.html +0 -16
- data/doc/classes/Nudge/Location.src/M000331.html +0 -20
- data/doc/classes/Nudge/Location.src/M000332.html +0 -17
- data/doc/classes/Nudge/Location.src/M000333.html +0 -17
- data/doc/classes/Nudge/NondominatedSubset.html +0 -196
- data/doc/classes/Nudge/NondominatedSubset.src/M000005.html +0 -19
- data/doc/classes/Nudge/NondominatedSubset.src/M000006.html +0 -19
- data/doc/classes/Nudge/NondominatedSubset.src/M000007.html +0 -25
- data/doc/classes/Nudge/NondominatedSubset.src/M000339.html +0 -19
- data/doc/classes/Nudge/NondominatedSubset.src/M000340.html +0 -19
- data/doc/classes/Nudge/NondominatedSubset.src/M000341.html +0 -25
- data/doc/classes/Nudge/PopulationResample.html +0 -175
- data/doc/classes/Nudge/PopulationResample.src/M000003.html +0 -22
- data/doc/classes/Nudge/PopulationResample.src/M000337.html +0 -22
- data/doc/classes/Nudge/ProgramPoint.html +0 -148
- data/doc/classes/Nudge/ProgramPoint.src/M000262.html +0 -15
- data/doc/classes/Nudge/RandomGuess.html +0 -176
- data/doc/classes/Nudge/RandomGuess.src/M000002.html +0 -21
- data/doc/classes/Nudge/RandomGuess.src/M000336.html +0 -21
- data/doc/classes/Nudge/ResampleValues.html +0 -169
- data/doc/classes/Nudge/ResampleValues.src/M000004.html +0 -36
- data/doc/classes/Nudge/ResampleValues.src/M000338.html +0 -36
- data/doc/classes/Nudge/SearchOperator.html +0 -175
- data/doc/classes/Nudge/SearchOperator.src/M000001.html +0 -15
- data/doc/classes/Nudge/SearchOperator.src/M000335.html +0 -15
- data/doc/classes/Nudge/Stack.html +0 -350
- data/doc/classes/Nudge/Stack.src/M000307.html +0 -15
- data/doc/classes/Nudge/Stack.src/M000308.html +0 -15
- data/doc/classes/Nudge/Stack.src/M000309.html +0 -18
- data/doc/classes/Nudge/Stack.src/M000310.html +0 -15
- data/doc/classes/Nudge/Stack.src/M000311.html +0 -15
- data/doc/classes/Nudge/Stack.src/M000312.html +0 -15
- data/doc/classes/Nudge/Stack.src/M000313.html +0 -15
- data/doc/classes/Nudge/UniformBackboneCrossover.html +0 -152
- data/doc/classes/Nudge/UniformBackboneCrossover.src/M000008.html +0 -35
- data/doc/classes/Nudge/UniformBackboneCrossover.src/M000342.html +0 -35
- data/doc/classes/Nudge.html +0 -174
- data/doc/classes/NudgeType.html +0 -363
- data/doc/classes/NudgeType.src/M000225.html +0 -17
- data/doc/classes/NudgeType.src/M000226.html +0 -15
- data/doc/classes/NudgeType.src/M000227.html +0 -15
- data/doc/classes/NudgeType.src/M000228.html +0 -15
- data/doc/classes/NudgeType.src/M000229.html +0 -15
- data/doc/classes/NudgeType.src/M000230.html +0 -15
- data/doc/classes/NudgeType.src/M000231.html +0 -15
- data/doc/classes/NudgeType.src/M000232.html +0 -15
- data/doc/classes/NudgeType.src/M000233.html +0 -15
- data/doc/classes/NudgeType.src/M000234.html +0 -15
- data/doc/created.rid +0 -1
- data/doc/files/lib/instructions/bool_basics_rb.html +0 -90
- data/doc/files/lib/instructions/comparisons_rb.html +0 -90
- data/doc/files/lib/instructions/conditionals_rb.html +0 -90
- data/doc/files/lib/instructions/conversions_rb.html +0 -90
- data/doc/files/lib/instructions/exec_rb.html +0 -90
- data/doc/files/lib/instructions/float_arithmetic_rb.html +0 -90
- data/doc/files/lib/instructions/float_transcendental_rb.html +0 -90
- data/doc/files/lib/instructions/infrastructure_rb.html +0 -100
- data/doc/files/lib/instructions/int_arithmetic_rb.html +0 -90
- data/doc/files/lib/instructions/random_value_rb.html +0 -90
- data/doc/files/lib/instructions/stack_manipulation_rb.html +0 -90
- data/doc/files/lib/interpreter/grammars/nudge_language_helpers_rb.html +0 -97
- data/doc/files/lib/interpreter/grammars/nudge_language_treetop.html +0 -180
- data/doc/files/lib/interpreter/interpreter_rb.html +0 -90
- data/doc/files/lib/interpreter/programPoints_rb.html +0 -90
- data/doc/files/lib/interpreter/stack_rb.html +0 -90
- data/doc/files/lib/interpreter/types/codeType_rb.html +0 -157
- data/doc/files/lib/interpreter/types/codeType_rb.src/M000001.html +0 -15
- data/doc/files/lib/interpreter/types/codeType_rb.src/M000002.html +0 -15
- data/doc/files/lib/interpreter/types/pushTypes_rb.html +0 -107
- data/doc/files/lib/nudge_rb.html +0 -152
- data/doc/files/lib/search/evaluators/structural_complexity_rb.html +0 -90
- data/doc/files/lib/search/helpers_rb.html +0 -90
- data/doc/files/lib/search/individual/individual_rb.html +0 -90
- data/doc/files/lib/search/locations/location_rb.html +0 -100
- data/doc/files/lib/search/operators/basic_operators_rb.html +0 -90
- data/doc/fr_class_index.html +0 -191
- data/doc/fr_file_index.html +0 -71
- data/doc/fr_method_index.html +0 -711
- data/doc/index.html +0 -21
- data/doc/rdoc-style.css +0 -299
- data/features/parser_recognizes_nudge_language.feature +0 -9
- data/lib/instructions/bool_basics.rb +0 -85
- data/lib/instructions/comparisons.rb +0 -152
- data/lib/instructions/conditionals.rb +0 -44
- data/lib/instructions/conversions.rb +0 -94
- data/lib/instructions/exec.rb +0 -154
- data/lib/instructions/float_arithmetic.rb +0 -201
- data/lib/instructions/float_transcendental.rb +0 -47
- data/lib/instructions/int_arithmetic.rb +0 -160
- data/lib/instructions/name_basics.rb +0 -44
- data/lib/instructions/name_bindings.rb +0 -65
- data/lib/instructions/random_value.rb +0 -43
- data/lib/instructions/stack_manipulation.rb +0 -739
- data/lib/interpreter/grammars/nudge_language.treetop +0 -83
- data/lib/interpreter/grammars/nudge_language_helpers.rb +0 -64
- data/lib/search/experiments/experiment.rb +0 -53
- data/lib/search/helpers.rb +0 -22
- data/lib/search/individual/batch.rb +0 -25
- data/lib/search/individual/individual.rb +0 -145
- data/lib/search/operators/basic_operators.rb +0 -230
- data/lib/search/operators/evaluators.rb +0 -107
- data/lib/search/operators/samplers_and_selectors.rb +0 -123
- data/lib/search/stations/station.rb +0 -147
- data/nudge.gemspec +0 -706
- data/push_language_coverage.md +0 -177
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/spec/data/couchdb_spec.rb +0 -2
- data/spec/instructions/bool_basics_spec.rb +0 -97
- data/spec/instructions/bool_stack_spec.rb +0 -391
- data/spec/instructions/code_basics_spec.rb +0 -43
- data/spec/instructions/code_stack_spec.rb +0 -382
- data/spec/instructions/comparisons_spec.rb +0 -486
- data/spec/instructions/conditionals_spec.rb +0 -162
- data/spec/instructions/conversions_spec.rb +0 -92
- data/spec/instructions/exec_spec.rb +0 -883
- data/spec/instructions/float_calculations_spec.rb +0 -148
- data/spec/instructions/float_stack_spec.rb +0 -382
- data/spec/instructions/float_transcendental_spec.rb +0 -89
- data/spec/instructions/int_calculations_spec.rb +0 -125
- data/spec/instructions/int_stack_spec.rb +0 -398
- data/spec/instructions/name_basics_spec.rb +0 -158
- data/spec/instructions/name_bindings_spec.rb +0 -257
- data/spec/instructions/name_stack_spec.rb +0 -382
- data/spec/instructions/random_values_spec.rb +0 -68
- data/spec/integration/search_integration.rb +0 -67
- data/spec/interpreter/channel_spec.rb +0 -92
- data/spec/interpreter/codeblock_spec.rb +0 -135
- data/spec/interpreter/erc_spec.rb +0 -130
- data/spec/interpreter/literal_spec.rb +0 -94
- data/spec/interpreter/parser_spec.rb +0 -324
- data/spec/search/batch_spec.rb +0 -30
- data/spec/search/experiments/experiment_spec.rb +0 -101
- data/spec/search/helpers_spec.rb +0 -59
- data/spec/search/individual_spec.rb +0 -356
- data/spec/search/operators/any_one_sampler_spec.rb +0 -40
- data/spec/search/operators/dominated_quantile_spec.rb +0 -111
- data/spec/search/operators/duplicate_genomes_spec.rb +0 -35
- data/spec/search/operators/evaluators/program_point_evaluator_spec.rb +0 -43
- data/spec/search/operators/evaluators/test_case_evaluator_spec.rb +0 -133
- data/spec/search/operators/infrastructure_spec.rb +0 -47
- data/spec/search/operators/most_dominated_subset_spec.rb +0 -47
- data/spec/search/operators/nondominated_subset_spec.rb +0 -97
- data/spec/search/operators/pointCrossover_spec.rb +0 -55
- data/spec/search/operators/pointDeletion_spec.rb +0 -57
- data/spec/search/operators/pointMutation_spec.rb +0 -71
- data/spec/search/operators/random_guess_spec.rb +0 -51
- data/spec/search/operators/resample_and_clone_spec.rb +0 -50
- data/spec/search/operators/resample_values_spec.rb +0 -126
- data/spec/search/operators/sizePreservingMutation_spec.rb +0 -2
- data/spec/search/operators/uniformBackboneCrossover_spec.rb +0 -63
- data/spec/search/stations/station_spec.rb +0 -496
- data/test/test_generator_helper.rb +0 -29
- data/test/test_nudge_generator.rb +0 -43
- /data/lib/instructions/{code_basics.rb → code/code_noop.rb} +0 -0
- /data/{_spikes/nested_parsing/nested.rb → spec/support/shared_examples.rb} +0 -0
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe FloatYankInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = FloatYankInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
describe "\#go" do
|
16
|
+
before(:each) do
|
17
|
+
@i1 = FloatYankInstruction.new(@context)
|
18
|
+
@context.clear_stacks
|
19
|
+
@int1 = ValuePoint.new("int", 3)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "\#preconditions?" do
|
23
|
+
it "should check that there is one :float and at least one :int" do
|
24
|
+
@context.stacks[:float].push(ValuePoint.new("float", -99.99))
|
25
|
+
@context.stacks[:int].push(@int1)
|
26
|
+
@i1.preconditions?.should == true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "\#cleanup" do
|
31
|
+
before(:each) do
|
32
|
+
@context.clear_stacks
|
33
|
+
(1..3).each {|i| @context.stacks[:float].push(ValuePoint.new("float",i*0.5))}
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should not change anything if the position integer is negative" do
|
37
|
+
@context.stacks[:int].push(ValuePoint.new("int", -99))
|
38
|
+
@i1.go
|
39
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
40
|
+
and_now.should == [0.5,1.0,1.5]
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should not change anything if the position integer is zero" do
|
44
|
+
@context.stacks[:int].push(ValuePoint.new("int", 0))
|
45
|
+
@i1.go
|
46
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
47
|
+
and_now.should == [0.5,1.0,1.5]
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should pull the last item on the stack to the top if the position is more than the stackdepth" do
|
51
|
+
@context.stacks[:int].push(ValuePoint.new("int", 1000))
|
52
|
+
@i1.go
|
53
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
54
|
+
and_now.should == [1.0,1.5, 0.5]
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should yank the indicated item to the top of the stack, counting from the 'top' 'down'" do
|
58
|
+
@context.stacks[:int].push(ValuePoint.new("int", 1))
|
59
|
+
@i1.go
|
60
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
61
|
+
and_now.should == [0.5,1.5, 1.0]
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe FloatYankdupInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = FloatYankdupInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
describe "\#go" do
|
16
|
+
before(:each) do
|
17
|
+
@i1 = FloatYankdupInstruction.new(@context)
|
18
|
+
@context.clear_stacks
|
19
|
+
@int1 = ValuePoint.new("int", 3)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "\#preconditions?" do
|
23
|
+
it "should check that there is one :int and at least one :float" do
|
24
|
+
@context.stacks[:float].push(ValuePoint.new("float", 1.1))
|
25
|
+
@context.stacks[:int].push(@int1)
|
26
|
+
@i1.preconditions?.should == true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "\#cleanup" do
|
31
|
+
before(:each) do
|
32
|
+
@context.clear_stacks
|
33
|
+
(1..3).each {|i| @context.stacks[:float].push(ValuePoint.new("float",i*1.0))}
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should duplicate the top item if the position integer is negative" do
|
37
|
+
@context.stacks[:int].push(ValuePoint.new("int", -99))
|
38
|
+
@i1.go
|
39
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
40
|
+
and_now.should == [1.0,2.0,3.0, 3.0]
|
41
|
+
end
|
42
|
+
|
43
|
+
it "should duplicate the top item if the position integer is zero" do
|
44
|
+
@context.stacks[:int].push(ValuePoint.new("int", 0))
|
45
|
+
@i1.go
|
46
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
47
|
+
and_now.should == [1.0,2.0,3.0, 3.0]
|
48
|
+
end
|
49
|
+
|
50
|
+
it "should clone the bottom item and push it if the position is more than the stackdepth" do
|
51
|
+
@context.stacks[:int].push(ValuePoint.new("int", 1000))
|
52
|
+
@i1.go
|
53
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
54
|
+
and_now.should == [1.0,2.0,3.0, 1.0]
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should push a copy of the indicated item to the top of the stack, counting from the 'top down'" do
|
58
|
+
@context.stacks[:int].push(ValuePoint.new("int", 2))
|
59
|
+
@i1.go
|
60
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
61
|
+
and_now.should == [1.0,2.0,3.0, 1.0]
|
62
|
+
|
63
|
+
@context.stacks[:int].push(ValuePoint.new("int", 2))
|
64
|
+
@i1.go
|
65
|
+
and_now = @context.stacks[:float].entries.collect {|i| i.value}
|
66
|
+
and_now.should == [1.0,2.0,3.0, 1.0, 2.0]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -1,9 +1,40 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), "/../spec_helper")
|
2
2
|
include Nudge
|
3
3
|
|
4
|
+
|
5
|
+
class TestingInterdependencyInstruction < Instruction
|
6
|
+
def preconditions?
|
7
|
+
needs IntAddInstruction
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
4
11
|
describe "Instruction has a master list" do
|
5
12
|
it "should have an #all_instructions [getter] method to return a list of every defined instruction" do
|
6
13
|
# will be a list of every type subclassed from Instruction
|
7
14
|
Instruction.all_instructions.should include(IntAddInstruction)
|
8
15
|
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "capturing errors" do
|
19
|
+
describe "NotEnoughStackItems" do
|
20
|
+
describe "#preconditions?" do
|
21
|
+
it "should push an :error ValuePoint onto the :error stacks when NotEnoughStackItems is raised" do
|
22
|
+
context = Interpreter.new
|
23
|
+
i1 = IntAddInstruction.new(context)
|
24
|
+
lambda{i1.go}.should_not raise_error
|
25
|
+
context.stacks[:error].peek.blueprint.should include "int too small"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "MissingInstructionError" do
|
31
|
+
it "should push an error if missing interdependent Instruction is identified" do
|
32
|
+
context = Interpreter.new
|
33
|
+
context.disable(IntAddInstruction)
|
34
|
+
i1 = TestingInterdependencyInstruction.new(context)
|
35
|
+
lambda{i1.go}.should_not raise_error
|
36
|
+
context.stacks[:error].peek.blueprint.should include "needs IntAddInstruction"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
9
40
|
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe IntAbsInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = IntAbsInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "\#go" do
|
15
|
+
before(:each) do
|
16
|
+
@i1 = IntAbsInstruction.new(@context)
|
17
|
+
@context.clear_stacks
|
18
|
+
@int1 = ValuePoint.new("int", 1)
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "\#preconditions?" do
|
22
|
+
it "should check that there are enough parameters" do
|
23
|
+
10.times {@context.stacks[:int].push(@int1)}
|
24
|
+
@i1.preconditions?.should == true
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should raise an error if the preconditions aren't met" do
|
28
|
+
@context.clear_stacks
|
29
|
+
lambda{@i1.preconditions?}.should raise_error(Instruction::NotEnoughStackItems)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should successfully run #go only if all preconditions are met" do
|
33
|
+
5.times {@context.stacks[:int].push(@int1)}
|
34
|
+
@i1.should_receive(:cleanup)
|
35
|
+
@i1.go
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "\#derive" do
|
40
|
+
it "should pop all the arguments" do
|
41
|
+
1.times {@context.stacks[:int].push(@int1)}
|
42
|
+
@i1.stub!(:cleanup) # and do nothing
|
43
|
+
@i1.go
|
44
|
+
@context.stacks[:int].depth.should == 0
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
describe "\#cleanup" do
|
49
|
+
describe "should push the result" do
|
50
|
+
{[-3] => 3,[-0] => 0 }.each do |inputs, expected|
|
51
|
+
params = inputs.inspect
|
52
|
+
it "should produce #{expected} given #{params}" do
|
53
|
+
inputs.each {|i| @context.stacks[:int].push(ValuePoint.new("int", i))}
|
54
|
+
@i1.go
|
55
|
+
@context.stacks[:int].peek.value.should == expected
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
describe IntAddInstruction do
|
5
|
+
|
6
|
+
it_should_behave_like "every Nudge Instruction"
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
@context = Interpreter.new
|
10
|
+
@i1 = IntAddInstruction.new(@context)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "\#go" do
|
14
|
+
before(:each) do
|
15
|
+
@i1 = IntAddInstruction.new(@context)
|
16
|
+
@context.clear_stacks
|
17
|
+
@int1 = ValuePoint.new("int", 1)
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "\#preconditions?" do
|
21
|
+
it "should check that there are enough parameters" do
|
22
|
+
10.times {@context.stacks[:int].push(@int1)}
|
23
|
+
@i1.preconditions?.should == true
|
24
|
+
end
|
25
|
+
|
26
|
+
it "should raise an error if the preconditions aren't met" do
|
27
|
+
@context.clear_stacks
|
28
|
+
lambda{@i1.preconditions?}.should raise_error(Instruction::NotEnoughStackItems)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should successfully run #go only if all preconditions are met" do
|
32
|
+
5.times {@context.stacks[:int].push(@int1)}
|
33
|
+
@i1.should_receive(:cleanup)
|
34
|
+
@i1.go
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "\#derive" do
|
39
|
+
it "should pop all the arguments" do
|
40
|
+
2.times {@context.stacks[:int].push(@int1)}
|
41
|
+
@i1.stub!(:cleanup) # and do nothing
|
42
|
+
@i1.go
|
43
|
+
@context.stacks[:int].depth.should == 0
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "\#cleanup" do
|
48
|
+
describe "should push the result" do
|
49
|
+
{[1,3] => 4, [-3,-4] => -7}.each do |inputs, expected|
|
50
|
+
params = inputs.inspect
|
51
|
+
it "should produce #{expected} given #{params}" do
|
52
|
+
inputs.each {|i| @context.stacks[:int].push(ValuePoint.new("int", i))}
|
53
|
+
@i1.go
|
54
|
+
@context.stacks[:int].peek.value.should == expected
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
describe IntDefineInstruction do
|
5
|
+
|
6
|
+
it_should_behave_like "every Nudge Instruction"
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
@context = Interpreter.new
|
10
|
+
@i1 = IntDefineInstruction.new(@context)
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
describe "\#go" do
|
15
|
+
before(:each) do
|
16
|
+
@i1 = IntDefineInstruction.new(@context)
|
17
|
+
@context.clear_stacks
|
18
|
+
@name1 = ReferencePoint.new("xyz")
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "\#preconditions?" do
|
22
|
+
it "should check that there is one :name and one :int" do
|
23
|
+
@context.stacks[:name].push(@name1)
|
24
|
+
@context.stacks[:int].push(ValuePoint.new("int", 123))
|
25
|
+
@i1.preconditions?.should == true
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "\#cleanup" do
|
30
|
+
before(:each) do
|
31
|
+
@context.clear_stacks
|
32
|
+
@context.reset_names
|
33
|
+
end
|
34
|
+
|
35
|
+
it "should bind the top :int to the top :name" do
|
36
|
+
@context.stacks[:name].push(@name1)
|
37
|
+
@context.stacks[:int].push(ValuePoint.new("int", 123))
|
38
|
+
@i1.go
|
39
|
+
@context.stacks[:name].depth.should == 0
|
40
|
+
@context.stacks[:int].depth.should == 0
|
41
|
+
@context.names.length.should_not == 0
|
42
|
+
@context.names["xyz"].value.should == 123
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should overwrite the binding if it already exists" do
|
46
|
+
@context.bind_name("xyz", ValuePoint.new("bool", false))
|
47
|
+
@context.names["xyz"].value.should == false
|
48
|
+
|
49
|
+
@context.stacks[:name].push(@name1)
|
50
|
+
@context.stacks[:int].push(ValuePoint.new("int", 123))
|
51
|
+
@i1.go
|
52
|
+
@context.stacks[:name].depth.should == 0
|
53
|
+
@context.stacks[:int].depth.should == 0
|
54
|
+
@context.names.length.should_not == 0
|
55
|
+
@context.names["xyz"].value.should == 123
|
56
|
+
end
|
57
|
+
|
58
|
+
it "should not re-bind a name that is a variable, though" do
|
59
|
+
@context.bind_variable("xyz", ValuePoint.new("bool", false))
|
60
|
+
@context.stacks[:int].push(ValuePoint.new("int", 456))
|
61
|
+
@context.stacks[:name].push(ReferencePoint.new("xyz"))
|
62
|
+
@i1.go
|
63
|
+
@context.stacks[:error].peek.blueprint.should include("cannot redefine a variable")
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should raise an exception if it's binding the name to anything but a ValuePoint" do
|
67
|
+
@context.stacks[:int].push(9912) #the actual number
|
68
|
+
@context.stacks[:name].push(@name1)
|
69
|
+
lambda{@i1.go}.should raise_error
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe IntDepthInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = IntDepthInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "\#go" do
|
15
|
+
before(:each) do
|
16
|
+
@i1 = IntDepthInstruction.new(@context)
|
17
|
+
@context.clear_stacks
|
18
|
+
@int1 = ValuePoint.new("int", 1)
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "\#preconditions?" do
|
22
|
+
it "should check that the :int stack responds to #depth" do
|
23
|
+
@i1.preconditions?.should == true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "\#cleanup" do
|
28
|
+
it "should count the items on the stack" do
|
29
|
+
@i1.go
|
30
|
+
@context.stacks[:int].peek.value.should == 0
|
31
|
+
7.times {@context.stacks[:int].push @int1}
|
32
|
+
@i1.go
|
33
|
+
@context.stacks[:int].peek.value.should == 8
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe IntDivideInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = IntDivideInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
describe "\#go" do
|
15
|
+
before(:each) do
|
16
|
+
@i1 = IntDivideInstruction.new(@context)
|
17
|
+
@context.clear_stacks
|
18
|
+
@int1 = ValuePoint.new("int", 1)
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "\#preconditions?" do
|
22
|
+
it "should check that there are enough parameters" do
|
23
|
+
10.times {@context.stacks[:int].push(@int1)}
|
24
|
+
@i1.preconditions?.should == true
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should raise an error if the preconditions aren't met" do
|
28
|
+
@context.clear_stacks
|
29
|
+
lambda{@i1.preconditions?}.should raise_error(Instruction::NotEnoughStackItems)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "should successfully run #go only if all preconditions are met" do
|
33
|
+
5.times {@context.stacks[:int].push(@int1)}
|
34
|
+
@i1.should_receive(:cleanup)
|
35
|
+
@i1.go
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe "\#derive" do
|
40
|
+
it "should pop all the arguments" do
|
41
|
+
2.times {@context.stacks[:int].push(@int1)}
|
42
|
+
@i1.stub!(:cleanup) # and do nothing
|
43
|
+
@i1.go
|
44
|
+
@context.stacks[:int].depth.should == 0
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should raise the right exceptions if it tries to divide by zero" do
|
48
|
+
@context.clear_stacks
|
49
|
+
@context.stacks[:int].push(ValuePoint.new("int", 10))
|
50
|
+
@context.stacks[:int].push(ValuePoint.new("int", 0))
|
51
|
+
@i1.go
|
52
|
+
@context.stacks[:error].depth.should == 1
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "\#cleanup" do
|
57
|
+
describe "should push the result" do
|
58
|
+
{[9,3] => 3, [3,9] => 0, [-9,-3] => 3}.each do |inputs, expected|
|
59
|
+
params = inputs.inspect
|
60
|
+
it "should produce #{expected} given #{params}" do
|
61
|
+
inputs.each {|i| @context.stacks[:int].push(ValuePoint.new("int", i))}
|
62
|
+
@i1.go
|
63
|
+
@context.stacks[:int].peek.value.should == expected
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
3
|
+
include Nudge
|
4
|
+
|
5
|
+
describe "IntEqualQInstruction" do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = IntEqualQInstruction.new(@context)
|
12
|
+
@int1 = ValuePoint.new("int", 1)
|
13
|
+
@int2 = ValuePoint.new("int", 2)
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
it "should check that there are enough parameters" do
|
18
|
+
6.times {@context.stacks[:int].push(@int1)}
|
19
|
+
@i1.preconditions?.should == true
|
20
|
+
end
|
21
|
+
|
22
|
+
it "should raise an error if the preconditions aren't met" do
|
23
|
+
@context.clear_stacks # there are no params at all
|
24
|
+
lambda{@i1.preconditions?}.should raise_error(Instruction::NotEnoughStackItems)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should successfully run #go only if all preconditions are met" do
|
28
|
+
5.times {@context.stacks[:int].push(@int1)}
|
29
|
+
@i1.should_receive(:cleanup)
|
30
|
+
@i1.go
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should pop all the arguments" do
|
34
|
+
@context.clear_stacks
|
35
|
+
5.times {@context.stacks[:int].push(@int1)}
|
36
|
+
@i1.stub!(:cleanup) # and do nothing
|
37
|
+
@i1.go
|
38
|
+
@context.stacks[:int].depth.should == 3
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should push the result" do
|
42
|
+
@context.clear_stacks
|
43
|
+
@context.stacks[:int].push(@int1)
|
44
|
+
@context.stacks[:int].push(@int1)
|
45
|
+
@context.stacks[:int].push(@int1)
|
46
|
+
@context.stacks[:int].push(@int2)
|
47
|
+
@i1.go
|
48
|
+
@context.stacks[:bool].peek.value.should == false
|
49
|
+
@i1.go
|
50
|
+
@context.stacks[:bool].peek.value.should == true
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
|
5
|
+
describe IntFlushInstruction do
|
6
|
+
|
7
|
+
it_should_behave_like "every Nudge Instruction"
|
8
|
+
|
9
|
+
before(:each) do
|
10
|
+
@context = Interpreter.new
|
11
|
+
@i1 = IntFlushInstruction.new(@context)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
describe "\#go" do
|
16
|
+
before(:each) do
|
17
|
+
@i1 = IntFlushInstruction.new(@context)
|
18
|
+
@context.clear_stacks
|
19
|
+
@int1 = ValuePoint.new("int", 1)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "\#preconditions?" do
|
23
|
+
it "should check that the :int stack responds to #depth" do
|
24
|
+
@i1.preconditions?.should == true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "\#cleanup" do
|
29
|
+
it "should remove all items on the stack" do
|
30
|
+
11.times {@context.stacks[:int].push(@int1)}
|
31
|
+
@context.stacks[:int].depth.should == 11
|
32
|
+
@i1.go
|
33
|
+
@context.stacks[:int].depth.should == 0
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
3
|
+
include Nudge
|
4
|
+
|
5
|
+
|
6
|
+
describe "IntGreaterThanQInstruction" do
|
7
|
+
|
8
|
+
it_should_behave_like "every Nudge Instruction"
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@context = Interpreter.new
|
12
|
+
@i1 = IntGreaterThanQInstruction.new(@context)
|
13
|
+
@int1 = ValuePoint.new("int", 1)
|
14
|
+
@int2 = ValuePoint.new("int", 2)
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
it "should check that there are enough parameters" do
|
19
|
+
6.times {@context.stacks[:int].push(@int1)}
|
20
|
+
@i1.preconditions?.should == true
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should raise an error if the preconditions aren't met" do
|
24
|
+
@context.clear_stacks # there are no params at all
|
25
|
+
lambda{@i1.preconditions?}.should raise_error(Instruction::NotEnoughStackItems)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should successfully run #go only if all preconditions are met" do
|
29
|
+
5.times {@context.stacks[:int].push(@int1)}
|
30
|
+
@i1.should_receive(:cleanup)
|
31
|
+
@i1.go
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should pop all the arguments" do
|
35
|
+
@context.clear_stacks
|
36
|
+
5.times {@context.stacks[:int].push(@int1)}
|
37
|
+
@i1.stub!(:cleanup) # and do nothing
|
38
|
+
@i1.go
|
39
|
+
@context.stacks[:int].depth.should == 3
|
40
|
+
end
|
41
|
+
|
42
|
+
it "should push the result" do
|
43
|
+
@context.clear_stacks
|
44
|
+
@context.stacks[:int].push(@int1)
|
45
|
+
@context.stacks[:int].push(@int1)
|
46
|
+
@i1.go
|
47
|
+
@context.stacks[:bool].peek.value.should == false
|
48
|
+
|
49
|
+
@context.stacks[:int].push(@int1)
|
50
|
+
@context.stacks[:int].push(@int2)
|
51
|
+
@i1.go
|
52
|
+
@context.stacks[:bool].peek.value.should == false
|
53
|
+
|
54
|
+
@context.stacks[:int].push(@int2)
|
55
|
+
@context.stacks[:int].push(@int1)
|
56
|
+
@i1.go
|
57
|
+
@context.stacks[:bool].peek.value.should == true
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "../../spec_helper")
|
2
|
+
include Nudge
|
3
|
+
|
4
|
+
describe IntIfInstruction do
|
5
|
+
|
6
|
+
it_should_behave_like "every Nudge Instruction"
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
@context = Interpreter.new
|
10
|
+
@i1 = IntIfInstruction.new(@context)
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
describe "\#go" do
|
15
|
+
before(:each) do
|
16
|
+
@context = Interpreter.new
|
17
|
+
@i1 = IntIfInstruction.new(@context)
|
18
|
+
@v1 = ValuePoint.new("int", 1)
|
19
|
+
@v2 = ValuePoint.new("int", -100)
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "\#preconditions?" do
|
23
|
+
it "should check that there are two items on the target stack and at least one :bool" do
|
24
|
+
@context.stacks[:int].push(@v1)
|
25
|
+
@context.stacks[:int].push(@v2)
|
26
|
+
@context.stacks[:bool].push(ValuePoint.new("bool", true))
|
27
|
+
@i1.preconditions?.should == true
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
describe "\#cleanup" do
|
32
|
+
it "should keep the SECOND :int if the :bool is true, otherwise the top one" do
|
33
|
+
@context.stacks[:int].push(@v1)
|
34
|
+
@context.stacks[:int].push(@v2)
|
35
|
+
@context.stacks[:bool].push(ValuePoint.new("bool", true))
|
36
|
+
@i1.go
|
37
|
+
@context.stacks[:int].depth.should == 1
|
38
|
+
@context.stacks[:int].peek.value.should == 1
|
39
|
+
|
40
|
+
@context.stacks[:int].push(@v1)
|
41
|
+
@context.stacks[:int].push(@v2)
|
42
|
+
@context.stacks[:bool].push(ValuePoint.new("bool", false))
|
43
|
+
@i1.go
|
44
|
+
@context.stacks[:int].peek.value.should == -100
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|