nudge 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +23 -0
- data/VERSION +1 -0
- data/_spikes/couch_document_spike.rb +24 -0
- data/_spikes/nested_parsing/nested.rb +0 -0
- data/_spikes/nested_parsing/nested.treetop +6 -0
- data/_spikes/nudgeview/init.rb +19 -0
- data/_spikes/nudgeview/public/javascripts/app.js +12 -0
- data/_spikes/nudgeview/public/javascripts/jquery.js +4376 -0
- data/_spikes/nudgeview/public/javascripts/jquery.svg.js +1325 -0
- data/_spikes/nudgeview/views/index.erb +18 -0
- data/_spikes/nudgeview/views/index.haml +8 -0
- data/_spikes/simplestWeb/simplest.rb +44 -0
- data/_spikes/simplestWeb/views/main.erb +19 -0
- data/_spikes/sketches/nudgecode_spike.rb +146 -0
- data/_spikes/sketches/searchDSL_spike.rb +25 -0
- data/_spikes/sketches/search_operator_sketch_spike.txt +287 -0
- data/_spikes/sketches/searchspace_spike.rb +96 -0
- data/_spikes/symbolic_regression/activate.rb +35 -0
- data/_spikes/symbolic_regression/config/environment.rb +340 -0
- 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 +2 -0
- data/_spikes/symbolic_regression/experiment/objectives/summedSquaredError.rb +2 -0
- data/_spikes/symbolic_regression/lib/tasks/run.rake +0 -0
- data/doc/classes/BlockNode.html +146 -0
- data/doc/classes/BlockNode.src/M000246.html +18 -0
- data/doc/classes/BoolAndInstruction.html +218 -0
- data/doc/classes/BoolAndInstruction.src/M000003.html +15 -0
- data/doc/classes/BoolAndInstruction.src/M000004.html +16 -0
- data/doc/classes/BoolAndInstruction.src/M000005.html +15 -0
- data/doc/classes/BoolAndInstruction.src/M000006.html +15 -0
- data/doc/classes/BoolEqualQInstruction.html +218 -0
- data/doc/classes/BoolEqualQInstruction.src/M000015.html +15 -0
- data/doc/classes/BoolEqualQInstruction.src/M000016.html +16 -0
- data/doc/classes/BoolEqualQInstruction.src/M000017.html +15 -0
- data/doc/classes/BoolEqualQInstruction.src/M000018.html +15 -0
- data/doc/classes/BoolFromFloatInstruction.html +218 -0
- data/doc/classes/BoolFromFloatInstruction.src/M000071.html +15 -0
- data/doc/classes/BoolFromFloatInstruction.src/M000072.html +15 -0
- data/doc/classes/BoolFromFloatInstruction.src/M000073.html +15 -0
- data/doc/classes/BoolFromFloatInstruction.src/M000074.html +15 -0
- data/doc/classes/BoolFromIntInstruction.html +218 -0
- data/doc/classes/BoolFromIntInstruction.src/M000067.html +15 -0
- data/doc/classes/BoolFromIntInstruction.src/M000068.html +15 -0
- data/doc/classes/BoolFromIntInstruction.src/M000069.html +15 -0
- data/doc/classes/BoolFromIntInstruction.src/M000070.html +15 -0
- data/doc/classes/BoolNotInstruction.html +218 -0
- data/doc/classes/BoolNotInstruction.src/M000019.html +15 -0
- data/doc/classes/BoolNotInstruction.src/M000020.html +15 -0
- data/doc/classes/BoolNotInstruction.src/M000021.html +15 -0
- data/doc/classes/BoolNotInstruction.src/M000022.html +15 -0
- data/doc/classes/BoolOrInstruction.html +218 -0
- data/doc/classes/BoolOrInstruction.src/M000007.html +15 -0
- data/doc/classes/BoolOrInstruction.src/M000008.html +16 -0
- data/doc/classes/BoolOrInstruction.src/M000009.html +15 -0
- data/doc/classes/BoolOrInstruction.src/M000010.html +15 -0
- data/doc/classes/BoolRandomInstruction.html +218 -0
- data/doc/classes/BoolRandomInstruction.src/M000187.html +15 -0
- data/doc/classes/BoolRandomInstruction.src/M000188.html +14 -0
- data/doc/classes/BoolRandomInstruction.src/M000189.html +15 -0
- data/doc/classes/BoolRandomInstruction.src/M000190.html +15 -0
- data/doc/classes/BoolType.html +196 -0
- data/doc/classes/BoolType.src/M000240.html +16 -0
- data/doc/classes/BoolType.src/M000241.html +15 -0
- data/doc/classes/BoolType.src/M000242.html +15 -0
- data/doc/classes/BoolXorInstruction.html +218 -0
- data/doc/classes/BoolXorInstruction.src/M000011.html +15 -0
- data/doc/classes/BoolXorInstruction.src/M000012.html +16 -0
- data/doc/classes/BoolXorInstruction.src/M000013.html +15 -0
- data/doc/classes/BoolXorInstruction.src/M000014.html +15 -0
- data/doc/classes/ChannelNode.html +161 -0
- data/doc/classes/ChannelNode.src/M000249.html +15 -0
- data/doc/classes/ChannelNode.src/M000250.html +16 -0
- data/doc/classes/CodeType.html +269 -0
- data/doc/classes/CodeType.src/M000219.html +38 -0
- data/doc/classes/CodeType.src/M000220.html +16 -0
- data/doc/classes/CodeType.src/M000221.html +16 -0
- data/doc/classes/CodeType.src/M000222.html +16 -0
- data/doc/classes/CodeType.src/M000223.html +24 -0
- data/doc/classes/CodeType.src/M000224.html +42 -0
- data/doc/classes/ERCNode.html +183 -0
- data/doc/classes/ERCNode.src/M000254.html +15 -0
- data/doc/classes/ERCNode.src/M000255.html +16 -0
- data/doc/classes/ERCNode.src/M000256.html +16 -0
- data/doc/classes/ExecPopInstruction.html +218 -0
- data/doc/classes/ExecPopInstruction.src/M000075.html +15 -0
- data/doc/classes/ExecPopInstruction.src/M000076.html +14 -0
- data/doc/classes/ExecPopInstruction.src/M000077.html +15 -0
- data/doc/classes/ExecPopInstruction.src/M000078.html +14 -0
- data/doc/classes/FloatAbsInstruction.html +218 -0
- data/doc/classes/FloatAbsInstruction.src/M000107.html +15 -0
- data/doc/classes/FloatAbsInstruction.src/M000108.html +15 -0
- data/doc/classes/FloatAbsInstruction.src/M000109.html +15 -0
- data/doc/classes/FloatAbsInstruction.src/M000110.html +15 -0
- data/doc/classes/FloatAddInstruction.html +218 -0
- data/doc/classes/FloatAddInstruction.src/M000079.html +15 -0
- data/doc/classes/FloatAddInstruction.src/M000080.html +16 -0
- data/doc/classes/FloatAddInstruction.src/M000081.html +15 -0
- data/doc/classes/FloatAddInstruction.src/M000082.html +15 -0
- data/doc/classes/FloatCosineInstruction.html +218 -0
- data/doc/classes/FloatCosineInstruction.src/M000123.html +15 -0
- data/doc/classes/FloatCosineInstruction.src/M000124.html +15 -0
- data/doc/classes/FloatCosineInstruction.src/M000125.html +15 -0
- data/doc/classes/FloatCosineInstruction.src/M000126.html +15 -0
- data/doc/classes/FloatDivideInstruction.html +218 -0
- data/doc/classes/FloatDivideInstruction.src/M000091.html +15 -0
- data/doc/classes/FloatDivideInstruction.src/M000092.html +16 -0
- data/doc/classes/FloatDivideInstruction.src/M000093.html +20 -0
- data/doc/classes/FloatDivideInstruction.src/M000094.html +15 -0
- data/doc/classes/FloatFromBoolInstruction.html +218 -0
- data/doc/classes/FloatFromBoolInstruction.src/M000055.html +15 -0
- data/doc/classes/FloatFromBoolInstruction.src/M000056.html +15 -0
- data/doc/classes/FloatFromBoolInstruction.src/M000057.html +15 -0
- data/doc/classes/FloatFromBoolInstruction.src/M000058.html +15 -0
- data/doc/classes/FloatFromIntInstruction.html +218 -0
- data/doc/classes/FloatFromIntInstruction.src/M000063.html +15 -0
- data/doc/classes/FloatFromIntInstruction.src/M000064.html +15 -0
- data/doc/classes/FloatFromIntInstruction.src/M000065.html +15 -0
- data/doc/classes/FloatFromIntInstruction.src/M000066.html +15 -0
- data/doc/classes/FloatGreaterThanQInstruction.html +218 -0
- data/doc/classes/FloatGreaterThanQInstruction.src/M000035.html +15 -0
- data/doc/classes/FloatGreaterThanQInstruction.src/M000036.html +16 -0
- data/doc/classes/FloatGreaterThanQInstruction.src/M000037.html +15 -0
- data/doc/classes/FloatGreaterThanQInstruction.src/M000038.html +15 -0
- data/doc/classes/FloatIfInstruction.html +218 -0
- data/doc/classes/FloatIfInstruction.src/M000047.html +16 -0
- data/doc/classes/FloatIfInstruction.src/M000048.html +15 -0
- data/doc/classes/FloatIfInstruction.src/M000049.html +14 -0
- data/doc/classes/FloatIfInstruction.src/M000050.html +17 -0
- data/doc/classes/FloatLessThanQInstruction.html +218 -0
- data/doc/classes/FloatLessThanQInstruction.src/M000039.html +15 -0
- data/doc/classes/FloatLessThanQInstruction.src/M000040.html +16 -0
- data/doc/classes/FloatLessThanQInstruction.src/M000041.html +15 -0
- data/doc/classes/FloatLessThanQInstruction.src/M000042.html +15 -0
- data/doc/classes/FloatMaxInstruction.html +218 -0
- data/doc/classes/FloatMaxInstruction.src/M000095.html +15 -0
- data/doc/classes/FloatMaxInstruction.src/M000096.html +16 -0
- data/doc/classes/FloatMaxInstruction.src/M000097.html +15 -0
- data/doc/classes/FloatMaxInstruction.src/M000098.html +15 -0
- data/doc/classes/FloatMinInstruction.html +218 -0
- data/doc/classes/FloatMinInstruction.src/M000099.html +15 -0
- data/doc/classes/FloatMinInstruction.src/M000100.html +16 -0
- data/doc/classes/FloatMinInstruction.src/M000101.html +15 -0
- data/doc/classes/FloatMinInstruction.src/M000102.html +15 -0
- data/doc/classes/FloatMultiplyInstruction.html +218 -0
- data/doc/classes/FloatMultiplyInstruction.src/M000083.html +15 -0
- data/doc/classes/FloatMultiplyInstruction.src/M000084.html +16 -0
- data/doc/classes/FloatMultiplyInstruction.src/M000085.html +15 -0
- data/doc/classes/FloatMultiplyInstruction.src/M000086.html +15 -0
- data/doc/classes/FloatNegativeInstruction.html +218 -0
- data/doc/classes/FloatNegativeInstruction.src/M000103.html +15 -0
- data/doc/classes/FloatNegativeInstruction.src/M000104.html +15 -0
- data/doc/classes/FloatNegativeInstruction.src/M000105.html +15 -0
- data/doc/classes/FloatNegativeInstruction.src/M000106.html +15 -0
- data/doc/classes/FloatPowerInstruction.html +218 -0
- data/doc/classes/FloatPowerInstruction.src/M000111.html +15 -0
- data/doc/classes/FloatPowerInstruction.src/M000112.html +16 -0
- data/doc/classes/FloatPowerInstruction.src/M000113.html +20 -0
- data/doc/classes/FloatPowerInstruction.src/M000114.html +15 -0
- data/doc/classes/FloatRandomInstruction.html +218 -0
- data/doc/classes/FloatRandomInstruction.src/M000191.html +15 -0
- data/doc/classes/FloatRandomInstruction.src/M000192.html +14 -0
- data/doc/classes/FloatRandomInstruction.src/M000193.html +15 -0
- data/doc/classes/FloatRandomInstruction.src/M000194.html +15 -0
- data/doc/classes/FloatSineInstruction.html +218 -0
- data/doc/classes/FloatSineInstruction.src/M000119.html +15 -0
- data/doc/classes/FloatSineInstruction.src/M000120.html +15 -0
- data/doc/classes/FloatSineInstruction.src/M000121.html +15 -0
- data/doc/classes/FloatSineInstruction.src/M000122.html +15 -0
- data/doc/classes/FloatSqrtInstruction.html +218 -0
- data/doc/classes/FloatSqrtInstruction.src/M000115.html +15 -0
- data/doc/classes/FloatSqrtInstruction.src/M000116.html +15 -0
- data/doc/classes/FloatSqrtInstruction.src/M000117.html +19 -0
- data/doc/classes/FloatSqrtInstruction.src/M000118.html +15 -0
- data/doc/classes/FloatSubtractInstruction.html +218 -0
- data/doc/classes/FloatSubtractInstruction.src/M000087.html +15 -0
- data/doc/classes/FloatSubtractInstruction.src/M000088.html +16 -0
- data/doc/classes/FloatSubtractInstruction.src/M000089.html +15 -0
- data/doc/classes/FloatSubtractInstruction.src/M000090.html +15 -0
- data/doc/classes/FloatTangentInstruction.html +218 -0
- data/doc/classes/FloatTangentInstruction.src/M000127.html +15 -0
- data/doc/classes/FloatTangentInstruction.src/M000128.html +15 -0
- data/doc/classes/FloatTangentInstruction.src/M000129.html +15 -0
- data/doc/classes/FloatTangentInstruction.src/M000130.html +15 -0
- data/doc/classes/FloatType.html +196 -0
- data/doc/classes/FloatType.src/M000243.html +19 -0
- data/doc/classes/FloatType.src/M000244.html +15 -0
- data/doc/classes/FloatType.src/M000245.html +15 -0
- data/doc/classes/Helpers.html +161 -0
- data/doc/classes/Helpers.src/M000343.html +21 -0
- data/doc/classes/Helpers.src/M000344.html +24 -0
- data/doc/classes/Instruction/InstructionMethodError.html +110 -0
- data/doc/classes/Instruction/NaNResultError.html +110 -0
- data/doc/classes/Instruction/NotEnoughStackItems.html +110 -0
- data/doc/classes/Instruction.html +500 -0
- data/doc/classes/Instruction.src/M000131.html +17 -0
- data/doc/classes/Instruction.src/M000132.html +15 -0
- data/doc/classes/Instruction.src/M000133.html +15 -0
- data/doc/classes/Instruction.src/M000134.html +15 -0
- data/doc/classes/Instruction.src/M000135.html +15 -0
- data/doc/classes/Instruction.src/M000136.html +15 -0
- data/doc/classes/Instruction.src/M000137.html +15 -0
- data/doc/classes/Instruction.src/M000138.html +15 -0
- data/doc/classes/Instruction.src/M000139.html +22 -0
- data/doc/classes/Instruction.src/M000140.html +15 -0
- data/doc/classes/Instruction.src/M000141.html +25 -0
- data/doc/classes/Instruction.src/M000142.html +15 -0
- data/doc/classes/Instruction.src/M000143.html +15 -0
- data/doc/classes/Instruction.src/M000144.html +15 -0
- data/doc/classes/Instruction.src/M000145.html +15 -0
- data/doc/classes/Instruction.src/M000146.html +15 -0
- data/doc/classes/InstructionNode.html +161 -0
- data/doc/classes/InstructionNode.src/M000247.html +15 -0
- data/doc/classes/InstructionNode.src/M000248.html +16 -0
- data/doc/classes/IntAbsInstruction.html +218 -0
- data/doc/classes/IntAbsInstruction.src/M000175.html +15 -0
- data/doc/classes/IntAbsInstruction.src/M000176.html +15 -0
- data/doc/classes/IntAbsInstruction.src/M000177.html +15 -0
- data/doc/classes/IntAbsInstruction.src/M000178.html +15 -0
- data/doc/classes/IntAddInstruction.html +218 -0
- data/doc/classes/IntAddInstruction.src/M000147.html +15 -0
- data/doc/classes/IntAddInstruction.src/M000148.html +16 -0
- data/doc/classes/IntAddInstruction.src/M000149.html +15 -0
- data/doc/classes/IntAddInstruction.src/M000150.html +15 -0
- data/doc/classes/IntDepthInstruction.html +218 -0
- data/doc/classes/IntDepthInstruction.src/M000211.html +15 -0
- data/doc/classes/IntDepthInstruction.src/M000212.html +14 -0
- data/doc/classes/IntDepthInstruction.src/M000213.html +15 -0
- data/doc/classes/IntDepthInstruction.src/M000214.html +15 -0
- data/doc/classes/IntDivideInstruction.html +218 -0
- data/doc/classes/IntDivideInstruction.src/M000155.html +15 -0
- data/doc/classes/IntDivideInstruction.src/M000156.html +16 -0
- data/doc/classes/IntDivideInstruction.src/M000157.html +20 -0
- data/doc/classes/IntDivideInstruction.src/M000158.html +15 -0
- data/doc/classes/IntDuplicateInstruction.html +218 -0
- data/doc/classes/IntDuplicateInstruction.src/M000203.html +15 -0
- data/doc/classes/IntDuplicateInstruction.src/M000204.html +15 -0
- data/doc/classes/IntDuplicateInstruction.src/M000205.html +15 -0
- data/doc/classes/IntDuplicateInstruction.src/M000206.html +15 -0
- data/doc/classes/IntEqualQInstruction.html +218 -0
- data/doc/classes/IntEqualQInstruction.src/M000023.html +15 -0
- data/doc/classes/IntEqualQInstruction.src/M000024.html +16 -0
- data/doc/classes/IntEqualQInstruction.src/M000025.html +15 -0
- data/doc/classes/IntEqualQInstruction.src/M000026.html +15 -0
- data/doc/classes/IntFlushInstruction.html +218 -0
- data/doc/classes/IntFlushInstruction.src/M000215.html +15 -0
- data/doc/classes/IntFlushInstruction.src/M000216.html +14 -0
- data/doc/classes/IntFlushInstruction.src/M000217.html +14 -0
- data/doc/classes/IntFlushInstruction.src/M000218.html +15 -0
- data/doc/classes/IntFromBoolInstruction.html +218 -0
- data/doc/classes/IntFromBoolInstruction.src/M000051.html +15 -0
- data/doc/classes/IntFromBoolInstruction.src/M000052.html +15 -0
- data/doc/classes/IntFromBoolInstruction.src/M000053.html +15 -0
- data/doc/classes/IntFromBoolInstruction.src/M000054.html +15 -0
- data/doc/classes/IntFromFloatInstruction.html +218 -0
- data/doc/classes/IntFromFloatInstruction.src/M000059.html +15 -0
- data/doc/classes/IntFromFloatInstruction.src/M000060.html +15 -0
- data/doc/classes/IntFromFloatInstruction.src/M000061.html +15 -0
- data/doc/classes/IntFromFloatInstruction.src/M000062.html +15 -0
- data/doc/classes/IntGreaterThanQInstruction.html +218 -0
- data/doc/classes/IntGreaterThanQInstruction.src/M000031.html +15 -0
- data/doc/classes/IntGreaterThanQInstruction.src/M000032.html +16 -0
- data/doc/classes/IntGreaterThanQInstruction.src/M000033.html +15 -0
- data/doc/classes/IntGreaterThanQInstruction.src/M000034.html +15 -0
- data/doc/classes/IntIfInstruction.html +218 -0
- data/doc/classes/IntIfInstruction.src/M000043.html +16 -0
- data/doc/classes/IntIfInstruction.src/M000044.html +15 -0
- data/doc/classes/IntIfInstruction.src/M000045.html +14 -0
- data/doc/classes/IntIfInstruction.src/M000046.html +17 -0
- data/doc/classes/IntLessThanQInstruction.html +218 -0
- data/doc/classes/IntLessThanQInstruction.src/M000027.html +15 -0
- data/doc/classes/IntLessThanQInstruction.src/M000028.html +16 -0
- data/doc/classes/IntLessThanQInstruction.src/M000029.html +15 -0
- data/doc/classes/IntLessThanQInstruction.src/M000030.html +15 -0
- data/doc/classes/IntMaxInstruction.html +218 -0
- data/doc/classes/IntMaxInstruction.src/M000167.html +15 -0
- data/doc/classes/IntMaxInstruction.src/M000168.html +16 -0
- data/doc/classes/IntMaxInstruction.src/M000169.html +16 -0
- data/doc/classes/IntMaxInstruction.src/M000170.html +15 -0
- data/doc/classes/IntMinInstruction.html +218 -0
- data/doc/classes/IntMinInstruction.src/M000171.html +15 -0
- data/doc/classes/IntMinInstruction.src/M000172.html +16 -0
- data/doc/classes/IntMinInstruction.src/M000173.html +16 -0
- data/doc/classes/IntMinInstruction.src/M000174.html +15 -0
- data/doc/classes/IntModuloInstruction.html +218 -0
- data/doc/classes/IntModuloInstruction.src/M000163.html +15 -0
- data/doc/classes/IntModuloInstruction.src/M000164.html +16 -0
- data/doc/classes/IntModuloInstruction.src/M000165.html +20 -0
- data/doc/classes/IntModuloInstruction.src/M000166.html +15 -0
- data/doc/classes/IntMultiplyInstruction.html +218 -0
- data/doc/classes/IntMultiplyInstruction.src/M000151.html +15 -0
- data/doc/classes/IntMultiplyInstruction.src/M000152.html +16 -0
- data/doc/classes/IntMultiplyInstruction.src/M000153.html +15 -0
- data/doc/classes/IntMultiplyInstruction.src/M000154.html +15 -0
- data/doc/classes/IntNegativeInstruction.html +218 -0
- data/doc/classes/IntNegativeInstruction.src/M000179.html +15 -0
- data/doc/classes/IntNegativeInstruction.src/M000180.html +15 -0
- data/doc/classes/IntNegativeInstruction.src/M000181.html +15 -0
- data/doc/classes/IntNegativeInstruction.src/M000182.html +15 -0
- data/doc/classes/IntPopInstruction.html +218 -0
- data/doc/classes/IntPopInstruction.src/M000195.html +15 -0
- data/doc/classes/IntPopInstruction.src/M000196.html +15 -0
- data/doc/classes/IntPopInstruction.src/M000197.html +14 -0
- data/doc/classes/IntPopInstruction.src/M000198.html +14 -0
- data/doc/classes/IntRandomInstruction.html +218 -0
- data/doc/classes/IntRandomInstruction.src/M000183.html +15 -0
- data/doc/classes/IntRandomInstruction.src/M000184.html +14 -0
- data/doc/classes/IntRandomInstruction.src/M000185.html +15 -0
- data/doc/classes/IntRandomInstruction.src/M000186.html +15 -0
- data/doc/classes/IntRotateInstruction.html +218 -0
- data/doc/classes/IntRotateInstruction.src/M000207.html +15 -0
- data/doc/classes/IntRotateInstruction.src/M000208.html +17 -0
- data/doc/classes/IntRotateInstruction.src/M000209.html +14 -0
- data/doc/classes/IntRotateInstruction.src/M000210.html +17 -0
- data/doc/classes/IntSubtractInstruction.html +218 -0
- data/doc/classes/IntSubtractInstruction.src/M000159.html +15 -0
- data/doc/classes/IntSubtractInstruction.src/M000160.html +16 -0
- data/doc/classes/IntSubtractInstruction.src/M000161.html +16 -0
- data/doc/classes/IntSubtractInstruction.src/M000162.html +15 -0
- data/doc/classes/IntSwapInstruction.html +218 -0
- data/doc/classes/IntSwapInstruction.src/M000199.html +15 -0
- data/doc/classes/IntSwapInstruction.src/M000200.html +16 -0
- data/doc/classes/IntSwapInstruction.src/M000201.html +14 -0
- data/doc/classes/IntSwapInstruction.src/M000202.html +16 -0
- data/doc/classes/IntType.html +240 -0
- data/doc/classes/IntType.src/M000235.html +15 -0
- data/doc/classes/IntType.src/M000236.html +15 -0
- data/doc/classes/IntType.src/M000237.html +18 -0
- data/doc/classes/IntType.src/M000238.html +15 -0
- data/doc/classes/IntType.src/M000239.html +15 -0
- data/doc/classes/LiteralNode.html +183 -0
- data/doc/classes/LiteralNode.src/M000251.html +15 -0
- data/doc/classes/LiteralNode.src/M000252.html +16 -0
- data/doc/classes/LiteralNode.src/M000253.html +16 -0
- data/doc/classes/Nudge/Channel.html +437 -0
- data/doc/classes/Nudge/Channel.src/M000286.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000287.html +19 -0
- data/doc/classes/Nudge/Channel.src/M000288.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000289.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000290.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000291.html +19 -0
- data/doc/classes/Nudge/Channel.src/M000292.html +19 -0
- data/doc/classes/Nudge/Channel.src/M000293.html +17 -0
- data/doc/classes/Nudge/Channel.src/M000294.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000295.html +20 -0
- data/doc/classes/Nudge/Channel.src/M000296.html +15 -0
- data/doc/classes/Nudge/Channel.src/M000297.html +17 -0
- data/doc/classes/Nudge/Channel.src/M000298.html +15 -0
- data/doc/classes/Nudge/CodeBlock.html +331 -0
- data/doc/classes/Nudge/CodeBlock.src/M000263.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000264.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000265.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000266.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000267.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000268.html +17 -0
- data/doc/classes/Nudge/CodeBlock.src/M000269.html +20 -0
- data/doc/classes/Nudge/CodeBlock.src/M000270.html +15 -0
- data/doc/classes/Nudge/CodeBlock.src/M000271.html +19 -0
- data/doc/classes/Nudge/DeadLocation.html +152 -0
- data/doc/classes/Nudge/DeadLocation.src/M000334.html +17 -0
- data/doc/classes/Nudge/Erc.html +335 -0
- data/doc/classes/Nudge/Erc.src/M000278.html +16 -0
- data/doc/classes/Nudge/Erc.src/M000279.html +15 -0
- data/doc/classes/Nudge/Erc.src/M000280.html +15 -0
- data/doc/classes/Nudge/Erc.src/M000281.html +15 -0
- data/doc/classes/Nudge/Erc.src/M000282.html +18 -0
- data/doc/classes/Nudge/Erc.src/M000283.html +15 -0
- data/doc/classes/Nudge/Erc.src/M000284.html +17 -0
- data/doc/classes/Nudge/Erc.src/M000285.html +15 -0
- data/doc/classes/Nudge/Individual.html +313 -0
- data/doc/classes/Nudge/Individual.src/M000314.html +21 -0
- data/doc/classes/Nudge/Individual.src/M000315.html +15 -0
- data/doc/classes/Nudge/Individual.src/M000316.html +15 -0
- data/doc/classes/Nudge/Individual.src/M000317.html +17 -0
- data/doc/classes/Nudge/Individual.src/M000318.html +25 -0
- data/doc/classes/Nudge/InstructionPoint/InstructionNotFoundError.html +110 -0
- data/doc/classes/Nudge/InstructionPoint.html +350 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000299.html +15 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000300.html +15 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000301.html +17 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000302.html +15 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000303.html +17 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000304.html +17 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000305.html +17 -0
- data/doc/classes/Nudge/InstructionPoint.src/M000306.html +15 -0
- data/doc/classes/Nudge/Interpreter.html +369 -0
- data/doc/classes/Nudge/Interpreter.src/M000257.html +20 -0
- data/doc/classes/Nudge/Interpreter.src/M000258.html +19 -0
- data/doc/classes/Nudge/Interpreter.src/M000259.html +15 -0
- data/doc/classes/Nudge/Interpreter.src/M000260.html +19 -0
- data/doc/classes/Nudge/Interpreter.src/M000261.html +17 -0
- data/doc/classes/Nudge/LiteralPoint.html +291 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000272.html +16 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000273.html +15 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000274.html +15 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000275.html +18 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000276.html +17 -0
- data/doc/classes/Nudge/LiteralPoint.src/M000277.html +15 -0
- data/doc/classes/Nudge/Location.html +525 -0
- data/doc/classes/Nudge/Location.src/M000319.html +19 -0
- data/doc/classes/Nudge/Location.src/M000320.html +15 -0
- data/doc/classes/Nudge/Location.src/M000321.html +26 -0
- data/doc/classes/Nudge/Location.src/M000322.html +15 -0
- data/doc/classes/Nudge/Location.src/M000323.html +20 -0
- data/doc/classes/Nudge/Location.src/M000324.html +16 -0
- data/doc/classes/Nudge/Location.src/M000325.html +25 -0
- data/doc/classes/Nudge/Location.src/M000326.html +15 -0
- data/doc/classes/Nudge/Location.src/M000327.html +21 -0
- data/doc/classes/Nudge/Location.src/M000328.html +16 -0
- data/doc/classes/Nudge/Location.src/M000329.html +15 -0
- data/doc/classes/Nudge/Location.src/M000330.html +16 -0
- data/doc/classes/Nudge/Location.src/M000331.html +20 -0
- data/doc/classes/Nudge/Location.src/M000332.html +17 -0
- data/doc/classes/Nudge/Location.src/M000333.html +17 -0
- data/doc/classes/Nudge/NondominatedSubset.html +196 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000005.html +19 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000006.html +19 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000007.html +25 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000339.html +19 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000340.html +19 -0
- data/doc/classes/Nudge/NondominatedSubset.src/M000341.html +25 -0
- data/doc/classes/Nudge/PopulationResample.html +175 -0
- data/doc/classes/Nudge/PopulationResample.src/M000003.html +22 -0
- data/doc/classes/Nudge/PopulationResample.src/M000337.html +22 -0
- data/doc/classes/Nudge/ProgramPoint.html +148 -0
- data/doc/classes/Nudge/ProgramPoint.src/M000262.html +15 -0
- data/doc/classes/Nudge/RandomGuess.html +176 -0
- data/doc/classes/Nudge/RandomGuess.src/M000002.html +21 -0
- data/doc/classes/Nudge/RandomGuess.src/M000336.html +21 -0
- data/doc/classes/Nudge/ResampleValues.html +169 -0
- data/doc/classes/Nudge/ResampleValues.src/M000004.html +36 -0
- data/doc/classes/Nudge/ResampleValues.src/M000338.html +36 -0
- data/doc/classes/Nudge/SearchOperator.html +175 -0
- data/doc/classes/Nudge/SearchOperator.src/M000001.html +15 -0
- data/doc/classes/Nudge/SearchOperator.src/M000335.html +15 -0
- data/doc/classes/Nudge/Stack.html +350 -0
- data/doc/classes/Nudge/Stack.src/M000307.html +15 -0
- data/doc/classes/Nudge/Stack.src/M000308.html +15 -0
- data/doc/classes/Nudge/Stack.src/M000309.html +18 -0
- data/doc/classes/Nudge/Stack.src/M000310.html +15 -0
- data/doc/classes/Nudge/Stack.src/M000311.html +15 -0
- data/doc/classes/Nudge/Stack.src/M000312.html +15 -0
- data/doc/classes/Nudge/Stack.src/M000313.html +15 -0
- data/doc/classes/Nudge/UniformBackboneCrossover.html +152 -0
- data/doc/classes/Nudge/UniformBackboneCrossover.src/M000008.html +35 -0
- data/doc/classes/Nudge/UniformBackboneCrossover.src/M000342.html +35 -0
- data/doc/classes/Nudge.html +174 -0
- data/doc/classes/NudgeType.html +363 -0
- data/doc/classes/NudgeType.src/M000225.html +17 -0
- data/doc/classes/NudgeType.src/M000226.html +15 -0
- data/doc/classes/NudgeType.src/M000227.html +15 -0
- data/doc/classes/NudgeType.src/M000228.html +15 -0
- data/doc/classes/NudgeType.src/M000229.html +15 -0
- data/doc/classes/NudgeType.src/M000230.html +15 -0
- data/doc/classes/NudgeType.src/M000231.html +15 -0
- data/doc/classes/NudgeType.src/M000232.html +15 -0
- data/doc/classes/NudgeType.src/M000233.html +15 -0
- data/doc/classes/NudgeType.src/M000234.html +15 -0
- data/doc/created.rid +1 -0
- data/doc/files/lib/instructions/bool_basics_rb.html +90 -0
- data/doc/files/lib/instructions/comparisons_rb.html +90 -0
- data/doc/files/lib/instructions/conditionals_rb.html +90 -0
- data/doc/files/lib/instructions/conversions_rb.html +90 -0
- data/doc/files/lib/instructions/exec_rb.html +90 -0
- data/doc/files/lib/instructions/float_arithmetic_rb.html +90 -0
- data/doc/files/lib/instructions/float_transcendental_rb.html +90 -0
- data/doc/files/lib/instructions/infrastructure_rb.html +100 -0
- data/doc/files/lib/instructions/int_arithmetic_rb.html +90 -0
- data/doc/files/lib/instructions/random_value_rb.html +90 -0
- data/doc/files/lib/instructions/stack_manipulation_rb.html +90 -0
- data/doc/files/lib/interpreter/grammars/nudge_language_helpers_rb.html +97 -0
- data/doc/files/lib/interpreter/grammars/nudge_language_treetop.html +180 -0
- data/doc/files/lib/interpreter/interpreter_rb.html +90 -0
- data/doc/files/lib/interpreter/programPoints_rb.html +90 -0
- data/doc/files/lib/interpreter/stack_rb.html +90 -0
- data/doc/files/lib/interpreter/types/codeType_rb.html +157 -0
- data/doc/files/lib/interpreter/types/codeType_rb.src/M000001.html +15 -0
- data/doc/files/lib/interpreter/types/codeType_rb.src/M000002.html +15 -0
- data/doc/files/lib/interpreter/types/pushTypes_rb.html +107 -0
- data/doc/files/lib/nudge_rb.html +152 -0
- data/doc/files/lib/search/evaluators/structural_complexity_rb.html +90 -0
- data/doc/files/lib/search/helpers_rb.html +90 -0
- data/doc/files/lib/search/individual/individual_rb.html +90 -0
- data/doc/files/lib/search/locations/location_rb.html +100 -0
- data/doc/files/lib/search/operators/basic_operators_rb.html +90 -0
- data/doc/fr_class_index.html +191 -0
- data/doc/fr_file_index.html +71 -0
- data/doc/fr_method_index.html +711 -0
- data/doc/index.html +21 -0
- data/doc/rdoc-style.css +299 -0
- data/features/parser_recognizes_nudge_language.feature +9 -0
- data/lib/instructions/bool_basics.rb +85 -0
- data/lib/instructions/code_basics.rb +14 -0
- data/lib/instructions/comparisons.rb +152 -0
- data/lib/instructions/conditionals.rb +44 -0
- data/lib/instructions/conversions.rb +94 -0
- data/lib/instructions/exec.rb +154 -0
- data/lib/instructions/float_arithmetic.rb +201 -0
- data/lib/instructions/float_transcendental.rb +47 -0
- data/lib/instructions/infrastructure.rb +84 -0
- data/lib/instructions/int_arithmetic.rb +160 -0
- data/lib/instructions/name_basics.rb +44 -0
- data/lib/instructions/name_bindings.rb +65 -0
- data/lib/instructions/random_value.rb +43 -0
- data/lib/instructions/stack_manipulation.rb +739 -0
- data/lib/interpreter/grammars/nudge_language.treetop +83 -0
- data/lib/interpreter/grammars/nudge_language_helpers.rb +64 -0
- data/lib/interpreter/interpreter.rb +176 -0
- data/lib/interpreter/programPoints.rb +236 -0
- data/lib/interpreter/stack.rb +39 -0
- data/lib/interpreter/types/codeType.rb +108 -0
- data/lib/interpreter/types/pushTypes.rb +102 -0
- data/lib/nudge.rb +38 -0
- data/lib/search/experiments/experiment.rb +53 -0
- data/lib/search/helpers.rb +22 -0
- data/lib/search/individual/batch.rb +25 -0
- data/lib/search/individual/individual.rb +147 -0
- data/lib/search/operators/basic_operators.rb +230 -0
- data/lib/search/operators/evaluators.rb +107 -0
- data/lib/search/operators/samplers_and_selectors.rb +123 -0
- data/lib/search/stations/station.rb +147 -0
- data/push_language_coverage.md +177 -0
- data/readme.md +19 -0
- data/spec/data/couchdb_spec.rb +2 -0
- data/spec/fixtures/just_block.example +1 -0
- data/spec/fixtures/just_block_with_newline.example +1 -0
- data/spec/fixtures/long_arithmetic.example +7 -0
- data/spec/fixtures/one_line_instr.example +1 -0
- data/spec/fixtures/untidy1.example +20 -0
- data/spec/fixtures/untidy1fixed.example +12 -0
- data/spec/instructions/bool_basics_spec.rb +97 -0
- data/spec/instructions/bool_stack_spec.rb +391 -0
- data/spec/instructions/code_basics_spec.rb +43 -0
- data/spec/instructions/code_stack_spec.rb +382 -0
- data/spec/instructions/comparisons_spec.rb +486 -0
- data/spec/instructions/conditionals_spec.rb +162 -0
- data/spec/instructions/conversions_spec.rb +92 -0
- data/spec/instructions/exec_spec.rb +883 -0
- data/spec/instructions/float_calculations_spec.rb +148 -0
- data/spec/instructions/float_stack_spec.rb +382 -0
- data/spec/instructions/float_transcendental_spec.rb +89 -0
- data/spec/instructions/instruction_class_spec.rb +9 -0
- data/spec/instructions/int_calculations_spec.rb +125 -0
- data/spec/instructions/int_stack_spec.rb +398 -0
- data/spec/instructions/name_basics_spec.rb +158 -0
- data/spec/instructions/name_bindings_spec.rb +257 -0
- data/spec/instructions/name_stack_spec.rb +382 -0
- data/spec/instructions/random_values_spec.rb +68 -0
- data/spec/integration/search_integration.rb +67 -0
- data/spec/interpreter/channel_spec.rb +92 -0
- data/spec/interpreter/codeblock_spec.rb +135 -0
- data/spec/interpreter/codetype_spec.rb +257 -0
- data/spec/interpreter/erc_spec.rb +130 -0
- data/spec/interpreter/instruction_spec.rb +97 -0
- data/spec/interpreter/interpreter_spec.rb +266 -0
- data/spec/interpreter/literal_spec.rb +94 -0
- data/spec/interpreter/parser_spec.rb +324 -0
- data/spec/interpreter/stack_spec.rb +81 -0
- data/spec/interpreter/types_spec.rb +102 -0
- data/spec/search/batch_spec.rb +30 -0
- data/spec/search/experiments/experiment_spec.rb +101 -0
- data/spec/search/helpers_spec.rb +59 -0
- data/spec/search/individual_spec.rb +356 -0
- data/spec/search/operators/any_one_sampler_spec.rb +40 -0
- data/spec/search/operators/dominated_quantile_spec.rb +111 -0
- data/spec/search/operators/duplicate_genomes_spec.rb +35 -0
- data/spec/search/operators/evaluators/program_point_evaluator_spec.rb +43 -0
- data/spec/search/operators/evaluators/test_case_evaluator_spec.rb +133 -0
- data/spec/search/operators/infrastructure_spec.rb +47 -0
- data/spec/search/operators/most_dominated_subset_spec.rb +47 -0
- data/spec/search/operators/nondominated_subset_spec.rb +97 -0
- data/spec/search/operators/pointCrossover_spec.rb +55 -0
- data/spec/search/operators/pointDeletion_spec.rb +57 -0
- data/spec/search/operators/pointMutation_spec.rb +71 -0
- data/spec/search/operators/random_guess_spec.rb +51 -0
- data/spec/search/operators/resample_and_clone_spec.rb +50 -0
- data/spec/search/operators/resample_values_spec.rb +126 -0
- data/spec/search/operators/sizePreservingMutation_spec.rb +2 -0
- data/spec/search/operators/uniformBackboneCrossover_spec.rb +63 -0
- data/spec/search/stations/station_spec.rb +496 -0
- data/spec/spec_helper.rb +11 -0
- metadata +738 -0
@@ -0,0 +1,739 @@
|
|
1
|
+
module PopInstruction
|
2
|
+
attr_reader :target_stack
|
3
|
+
|
4
|
+
def initialize(context, target_stack)
|
5
|
+
@target_stack = target_stack
|
6
|
+
super(context)
|
7
|
+
end
|
8
|
+
|
9
|
+
def preconditions?
|
10
|
+
needs @target_stack, 1
|
11
|
+
end
|
12
|
+
def setup
|
13
|
+
@result = @context.stacks[@target_stack].pop
|
14
|
+
end
|
15
|
+
def derive
|
16
|
+
end
|
17
|
+
def cleanup
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
class IntPopInstruction < Instruction
|
23
|
+
include PopInstruction
|
24
|
+
def initialize(context)
|
25
|
+
super(context, :int)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
class FloatPopInstruction < Instruction
|
31
|
+
include PopInstruction
|
32
|
+
def initialize(context)
|
33
|
+
super(context, :float)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
class BoolPopInstruction < Instruction
|
39
|
+
include PopInstruction
|
40
|
+
def initialize(context)
|
41
|
+
super(context, :bool)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
class ExecPopInstruction < Instruction
|
47
|
+
include PopInstruction
|
48
|
+
def initialize(context)
|
49
|
+
super(context, :exec)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
class NamePopInstruction < Instruction
|
55
|
+
include PopInstruction
|
56
|
+
def initialize(context)
|
57
|
+
super(context, :name)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
class CodePopInstruction < Instruction
|
63
|
+
include PopInstruction
|
64
|
+
def initialize(context)
|
65
|
+
super(context, :code)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
module SwapInstruction
|
76
|
+
attr_reader :target_stack
|
77
|
+
|
78
|
+
def initialize(context, target_stack)
|
79
|
+
@target_stack = target_stack
|
80
|
+
super(context)
|
81
|
+
end
|
82
|
+
|
83
|
+
def preconditions?
|
84
|
+
needs @target_stack, 2
|
85
|
+
end
|
86
|
+
def setup
|
87
|
+
@result1 = @context.stacks[@target_stack].pop
|
88
|
+
@result2 = @context.stacks[@target_stack].pop
|
89
|
+
end
|
90
|
+
def derive
|
91
|
+
end
|
92
|
+
def cleanup
|
93
|
+
pushes @target_stack, @result1
|
94
|
+
pushes @target_stack, @result2
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
|
99
|
+
class IntSwapInstruction < Instruction
|
100
|
+
include SwapInstruction
|
101
|
+
def initialize(context)
|
102
|
+
super(context, :int)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
class FloatSwapInstruction < Instruction
|
108
|
+
include SwapInstruction
|
109
|
+
def initialize(context)
|
110
|
+
super(context, :float)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
|
115
|
+
class BoolSwapInstruction < Instruction
|
116
|
+
include SwapInstruction
|
117
|
+
def initialize(context)
|
118
|
+
super(context, :bool)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
|
123
|
+
class ExecSwapInstruction < Instruction
|
124
|
+
include SwapInstruction
|
125
|
+
def initialize(context)
|
126
|
+
super(context, :exec)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
class NameSwapInstruction < Instruction
|
132
|
+
include SwapInstruction
|
133
|
+
def initialize(context)
|
134
|
+
super(context, :name)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
class CodeSwapInstruction < Instruction
|
140
|
+
include SwapInstruction
|
141
|
+
def initialize(context)
|
142
|
+
super(context, :code)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
module DuplicateInstruction
|
155
|
+
attr_reader :target_stack
|
156
|
+
|
157
|
+
def initialize(context, target_stack)
|
158
|
+
@target_stack = target_stack
|
159
|
+
super(context)
|
160
|
+
end
|
161
|
+
|
162
|
+
def preconditions?
|
163
|
+
needs @target_stack, 1
|
164
|
+
end
|
165
|
+
def setup
|
166
|
+
@arg1 = @context.stacks[@target_stack].peek.value
|
167
|
+
end
|
168
|
+
def derive
|
169
|
+
@result = LiteralPoint.new(@target_stack.to_s,@arg1)
|
170
|
+
end
|
171
|
+
def cleanup
|
172
|
+
pushes @target_stack, @result
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
|
177
|
+
class IntDuplicateInstruction < Instruction
|
178
|
+
include DuplicateInstruction
|
179
|
+
def initialize(context)
|
180
|
+
super(context, :int)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
|
185
|
+
class FloatDuplicateInstruction < Instruction
|
186
|
+
include DuplicateInstruction
|
187
|
+
def initialize(context)
|
188
|
+
super(context, :float)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
|
193
|
+
class BoolDuplicateInstruction < Instruction
|
194
|
+
include DuplicateInstruction
|
195
|
+
def initialize(context)
|
196
|
+
super(context, :bool)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
|
201
|
+
class ExecDuplicateInstruction < Instruction
|
202
|
+
include DuplicateInstruction
|
203
|
+
def initialize(context)
|
204
|
+
super(context, :exec)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
|
209
|
+
class NameDuplicateInstruction < Instruction
|
210
|
+
include DuplicateInstruction
|
211
|
+
def initialize(context)
|
212
|
+
super(context, :name)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
|
217
|
+
class CodeDuplicateInstruction < Instruction
|
218
|
+
include DuplicateInstruction
|
219
|
+
def initialize(context)
|
220
|
+
super(context, :code)
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
module RotateInstruction
|
232
|
+
attr_reader :target_stack
|
233
|
+
|
234
|
+
def initialize(context, target_stack)
|
235
|
+
@target_stack = target_stack
|
236
|
+
super(context)
|
237
|
+
end
|
238
|
+
|
239
|
+
def preconditions?
|
240
|
+
needs @target_stack, 3
|
241
|
+
end
|
242
|
+
def setup
|
243
|
+
@arg3 = @context.stacks[@target_stack].pop
|
244
|
+
@arg2 = @context.stacks[@target_stack].pop
|
245
|
+
@arg1 = @context.stacks[@target_stack].pop
|
246
|
+
end
|
247
|
+
def derive
|
248
|
+
end
|
249
|
+
def cleanup
|
250
|
+
pushes @target_stack, @arg2
|
251
|
+
pushes @target_stack, @arg3
|
252
|
+
pushes @target_stack, @arg1
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
|
257
|
+
class IntRotateInstruction < Instruction
|
258
|
+
include RotateInstruction
|
259
|
+
def initialize(context)
|
260
|
+
super(context, :int)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
|
265
|
+
class FloatRotateInstruction < Instruction
|
266
|
+
include RotateInstruction
|
267
|
+
def initialize(context)
|
268
|
+
super(context, :float)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
|
273
|
+
class BoolRotateInstruction < Instruction
|
274
|
+
include RotateInstruction
|
275
|
+
def initialize(context)
|
276
|
+
super(context, :bool)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
|
281
|
+
class ExecRotateInstruction < Instruction
|
282
|
+
include RotateInstruction
|
283
|
+
def initialize(context)
|
284
|
+
super(context, :exec)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
|
288
|
+
|
289
|
+
class NameRotateInstruction < Instruction
|
290
|
+
include RotateInstruction
|
291
|
+
def initialize(context)
|
292
|
+
super(context, :name)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
|
297
|
+
class CodeRotateInstruction < Instruction
|
298
|
+
include RotateInstruction
|
299
|
+
def initialize(context)
|
300
|
+
super(context, :code)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
module DepthInstruction
|
312
|
+
attr_reader :target_stack
|
313
|
+
|
314
|
+
def initialize(context, target_stack)
|
315
|
+
@target_stack = target_stack
|
316
|
+
super(context)
|
317
|
+
end
|
318
|
+
|
319
|
+
def preconditions?
|
320
|
+
@context.stacks[@target_stack].depth != nil
|
321
|
+
end
|
322
|
+
def setup
|
323
|
+
end
|
324
|
+
def derive
|
325
|
+
@result = LiteralPoint.new("int",@context.stacks[@target_stack].depth)
|
326
|
+
end
|
327
|
+
def cleanup
|
328
|
+
pushes :int, @result
|
329
|
+
end
|
330
|
+
end
|
331
|
+
|
332
|
+
|
333
|
+
class IntDepthInstruction < Instruction
|
334
|
+
include DepthInstruction
|
335
|
+
def initialize(context)
|
336
|
+
super(context, :int)
|
337
|
+
end
|
338
|
+
end
|
339
|
+
|
340
|
+
|
341
|
+
class FloatDepthInstruction < Instruction
|
342
|
+
include DepthInstruction
|
343
|
+
def initialize(context)
|
344
|
+
super(context, :float)
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
|
349
|
+
class BoolDepthInstruction < Instruction
|
350
|
+
include DepthInstruction
|
351
|
+
def initialize(context)
|
352
|
+
super(context, :bool)
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
|
357
|
+
class ExecDepthInstruction < Instruction
|
358
|
+
include DepthInstruction
|
359
|
+
def initialize(context)
|
360
|
+
super(context, :exec)
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
|
365
|
+
class NameDepthInstruction < Instruction
|
366
|
+
include DepthInstruction
|
367
|
+
def initialize(context)
|
368
|
+
super(context, :name)
|
369
|
+
end
|
370
|
+
end
|
371
|
+
|
372
|
+
|
373
|
+
class CodeDepthInstruction < Instruction
|
374
|
+
include DepthInstruction
|
375
|
+
def initialize(context)
|
376
|
+
super(context, :code)
|
377
|
+
end
|
378
|
+
end
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
module FlushInstruction
|
390
|
+
attr_reader :target_stack
|
391
|
+
|
392
|
+
def initialize(context, target_stack)
|
393
|
+
@target_stack = target_stack
|
394
|
+
super(context)
|
395
|
+
end
|
396
|
+
|
397
|
+
def preconditions?
|
398
|
+
@context.stacks[@target_stack].depth != nil
|
399
|
+
end
|
400
|
+
def setup
|
401
|
+
end
|
402
|
+
def derive
|
403
|
+
end
|
404
|
+
def cleanup
|
405
|
+
@context.stacks[@target_stack].clear
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
class IntFlushInstruction < Instruction
|
412
|
+
include FlushInstruction
|
413
|
+
def initialize(context)
|
414
|
+
super(context, :int)
|
415
|
+
end
|
416
|
+
end
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
class FloatFlushInstruction < Instruction
|
421
|
+
include FlushInstruction
|
422
|
+
def initialize(context)
|
423
|
+
super(context, :float)
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
427
|
+
|
428
|
+
class BoolFlushInstruction < Instruction
|
429
|
+
include FlushInstruction
|
430
|
+
def initialize(context)
|
431
|
+
super(context, :bool)
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
435
|
+
|
436
|
+
class ExecFlushInstruction < Instruction
|
437
|
+
include FlushInstruction
|
438
|
+
def initialize(context)
|
439
|
+
super(context, :exec)
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
|
444
|
+
class NameFlushInstruction < Instruction
|
445
|
+
include FlushInstruction
|
446
|
+
def initialize(context)
|
447
|
+
super(context, :name)
|
448
|
+
end
|
449
|
+
end
|
450
|
+
|
451
|
+
|
452
|
+
class CodeFlushInstruction < Instruction
|
453
|
+
include FlushInstruction
|
454
|
+
def initialize(context)
|
455
|
+
super(context, :code)
|
456
|
+
end
|
457
|
+
end
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
module ShoveInstruction
|
467
|
+
attr_reader :target_stack
|
468
|
+
|
469
|
+
def initialize(context, target_stack)
|
470
|
+
@target_stack = target_stack
|
471
|
+
super(context)
|
472
|
+
end
|
473
|
+
|
474
|
+
def preconditions?
|
475
|
+
if @target_stack != :int
|
476
|
+
needs :int, 1
|
477
|
+
needs @target_stack, 1
|
478
|
+
else
|
479
|
+
needs :int, 2
|
480
|
+
end
|
481
|
+
end
|
482
|
+
|
483
|
+
def setup
|
484
|
+
@how_far = @context.stacks[:int].pop.value
|
485
|
+
@result = @context.stacks[@target_stack].pop
|
486
|
+
end
|
487
|
+
|
488
|
+
def derive
|
489
|
+
max = @context.stacks[@target_stack].depth
|
490
|
+
case
|
491
|
+
when @how_far <= 0
|
492
|
+
@new_depth = max
|
493
|
+
when @how_far > max
|
494
|
+
@new_depth = 0
|
495
|
+
else
|
496
|
+
@new_depth = max - @how_far
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
def cleanup
|
501
|
+
@context.stacks[@target_stack].entries.insert(@new_depth,@result)
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
|
506
|
+
class IntShoveInstruction < Instruction
|
507
|
+
include ShoveInstruction
|
508
|
+
def initialize(context)
|
509
|
+
super(context, :int)
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
|
514
|
+
class BoolShoveInstruction < Instruction
|
515
|
+
include ShoveInstruction
|
516
|
+
def initialize(context)
|
517
|
+
super(context, :bool)
|
518
|
+
end
|
519
|
+
end
|
520
|
+
|
521
|
+
|
522
|
+
class FloatShoveInstruction < Instruction
|
523
|
+
include ShoveInstruction
|
524
|
+
def initialize(context)
|
525
|
+
super(context, :float)
|
526
|
+
end
|
527
|
+
end
|
528
|
+
|
529
|
+
|
530
|
+
class ExecShoveInstruction < Instruction
|
531
|
+
include ShoveInstruction
|
532
|
+
def initialize(context)
|
533
|
+
super(context, :exec)
|
534
|
+
end
|
535
|
+
end
|
536
|
+
|
537
|
+
|
538
|
+
class NameShoveInstruction < Instruction
|
539
|
+
include ShoveInstruction
|
540
|
+
def initialize(context)
|
541
|
+
super(context, :name)
|
542
|
+
end
|
543
|
+
end
|
544
|
+
|
545
|
+
|
546
|
+
class CodeShoveInstruction < Instruction
|
547
|
+
include ShoveInstruction
|
548
|
+
def initialize(context)
|
549
|
+
super(context, :code)
|
550
|
+
end
|
551
|
+
end
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
module YankInstruction
|
561
|
+
attr_reader :target_stack
|
562
|
+
|
563
|
+
def initialize(context, target_stack)
|
564
|
+
@target_stack = target_stack
|
565
|
+
super(context)
|
566
|
+
end
|
567
|
+
|
568
|
+
def preconditions?
|
569
|
+
if @target_stack != :int
|
570
|
+
needs :int, 1
|
571
|
+
needs @target_stack, 1
|
572
|
+
else
|
573
|
+
needs :int, 2
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
def setup
|
578
|
+
@from_where = @context.stacks[:int].pop.value
|
579
|
+
end
|
580
|
+
|
581
|
+
def derive
|
582
|
+
max = @context.stacks[@target_stack].depth-1
|
583
|
+
case
|
584
|
+
when @from_where < 0
|
585
|
+
@which = max
|
586
|
+
when @from_where > max
|
587
|
+
@which = 0
|
588
|
+
else
|
589
|
+
@which = max - @from_where
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
def cleanup
|
594
|
+
moved_value = @context.stacks[@target_stack].entries.delete_at(@which)
|
595
|
+
@context.stacks[@target_stack].push(moved_value)
|
596
|
+
end
|
597
|
+
end
|
598
|
+
|
599
|
+
|
600
|
+
class IntYankInstruction < Instruction
|
601
|
+
include YankInstruction
|
602
|
+
def initialize(context)
|
603
|
+
super(context, :int)
|
604
|
+
end
|
605
|
+
end
|
606
|
+
|
607
|
+
|
608
|
+
class FloatYankInstruction < Instruction
|
609
|
+
include YankInstruction
|
610
|
+
def initialize(context)
|
611
|
+
super(context, :float)
|
612
|
+
end
|
613
|
+
end
|
614
|
+
|
615
|
+
|
616
|
+
class BoolYankInstruction < Instruction
|
617
|
+
include YankInstruction
|
618
|
+
def initialize(context)
|
619
|
+
super(context, :bool)
|
620
|
+
end
|
621
|
+
end
|
622
|
+
|
623
|
+
|
624
|
+
class ExecYankInstruction < Instruction
|
625
|
+
include YankInstruction
|
626
|
+
def initialize(context)
|
627
|
+
super(context, :exec)
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
|
632
|
+
class NameYankInstruction < Instruction
|
633
|
+
include YankInstruction
|
634
|
+
def initialize(context)
|
635
|
+
super(context, :name)
|
636
|
+
end
|
637
|
+
end
|
638
|
+
|
639
|
+
|
640
|
+
class CodeYankInstruction < Instruction
|
641
|
+
include YankInstruction
|
642
|
+
def initialize(context)
|
643
|
+
super(context, :code)
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
module YankdupInstruction
|
654
|
+
attr_reader :target_stack
|
655
|
+
|
656
|
+
def initialize(context, target_stack)
|
657
|
+
@target_stack = target_stack
|
658
|
+
super(context)
|
659
|
+
end
|
660
|
+
|
661
|
+
def preconditions?
|
662
|
+
if @target_stack != :int
|
663
|
+
needs :int, 1
|
664
|
+
needs @target_stack, 1
|
665
|
+
else
|
666
|
+
needs :int, 2
|
667
|
+
end
|
668
|
+
end
|
669
|
+
|
670
|
+
def setup
|
671
|
+
@from_where = @context.stacks[:int].pop.value
|
672
|
+
end
|
673
|
+
|
674
|
+
def derive
|
675
|
+
max = @context.stacks[@target_stack].depth-1
|
676
|
+
case
|
677
|
+
when @from_where < 0
|
678
|
+
@which = max
|
679
|
+
when @from_where > max
|
680
|
+
@which = 0
|
681
|
+
else
|
682
|
+
@which = max - @from_where
|
683
|
+
end
|
684
|
+
end
|
685
|
+
|
686
|
+
def cleanup
|
687
|
+
moved_value = @context.stacks[@target_stack].entries[@which].dup
|
688
|
+
@context.stacks[@target_stack].push(moved_value)
|
689
|
+
end
|
690
|
+
end
|
691
|
+
|
692
|
+
|
693
|
+
class IntYankdupInstruction < Instruction
|
694
|
+
include YankdupInstruction
|
695
|
+
def initialize(context)
|
696
|
+
super(context, :int)
|
697
|
+
end
|
698
|
+
end
|
699
|
+
|
700
|
+
|
701
|
+
class FloatYankdupInstruction < Instruction
|
702
|
+
include YankdupInstruction
|
703
|
+
def initialize(context)
|
704
|
+
super(context, :float)
|
705
|
+
end
|
706
|
+
end
|
707
|
+
|
708
|
+
|
709
|
+
class BoolYankdupInstruction < Instruction
|
710
|
+
include YankdupInstruction
|
711
|
+
def initialize(context)
|
712
|
+
super(context, :bool)
|
713
|
+
end
|
714
|
+
end
|
715
|
+
|
716
|
+
|
717
|
+
class ExecYankdupInstruction < Instruction
|
718
|
+
include YankdupInstruction
|
719
|
+
def initialize(context)
|
720
|
+
super(context, :exec)
|
721
|
+
end
|
722
|
+
end
|
723
|
+
|
724
|
+
|
725
|
+
class NameYankdupInstruction < Instruction
|
726
|
+
include YankdupInstruction
|
727
|
+
def initialize(context)
|
728
|
+
super(context, :name)
|
729
|
+
end
|
730
|
+
end
|
731
|
+
|
732
|
+
|
733
|
+
class CodeYankdupInstruction < Instruction
|
734
|
+
include YankdupInstruction
|
735
|
+
def initialize(context)
|
736
|
+
super(context, :code)
|
737
|
+
end
|
738
|
+
end
|
739
|
+
|