cauldron 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. data/Gemfile +2 -1
  2. data/VERSION +1 -1
  3. data/features/cauldron_generates_runtime_method.feature +2 -2
  4. data/lib/Chain.rb +22 -6
  5. data/lib/UnifiedChain.rb +17 -2
  6. data/lib/cauldron.rb +3 -0
  7. data/lib/cauldron/pot.rb +50 -40
  8. data/lib/cauldron/terminal.rb +2 -2
  9. data/lib/core/ClassMethodCallContainer.rb +0 -1
  10. data/lib/core/MethodUsage.rb +0 -1
  11. data/lib/core/TheoryGenerator.rb +0 -4
  12. data/lib/core/runtime_method/RuntimeMethod.rb +1 -1
  13. data/lib/core/statement/ActsAsStatement.rb +1 -1
  14. data/lib/core/statement/Statement.rb +65 -146
  15. data/lib/core/statement/TheoryStatement.rb +1 -0
  16. data/lib/core/variable/FixnumVariable.rb +4 -5
  17. data/lib/core/variable/Unknown.rb +1 -11
  18. data/lib/core/variable/Variable.rb +1 -1
  19. data/lib/required.rb +0 -1
  20. data/lib/ruby_code/String.rb +0 -6
  21. data/lib/theory/TheoryConnector.rb +54 -117
  22. data/lib/util/ClassEvaluation.rb +9 -28
  23. data/lib/util/CodeEvaluation.rb +22 -18
  24. data/lib/util/DeclarationStatementEvaluation.rb +4 -3
  25. data/lib/util/MethodEvaluation.rb +6 -6
  26. data/lib/util/StatementCheck.rb +5 -3
  27. data/lib/util/StringToTheory.rb +0 -1
  28. data/spec/cauldron/pot_spec.rb +40 -0
  29. data/test/fixtures/theories/0/dump +0 -0
  30. data/test/fixtures/theories/1/dump +0 -0
  31. data/test/fixtures/theories/10/dump +0 -0
  32. data/test/fixtures/theories/11/dump +0 -0
  33. data/test/fixtures/theories/12/dump +0 -0
  34. data/test/fixtures/theories/13/dump +0 -0
  35. data/test/fixtures/theories/14/dump +0 -0
  36. data/test/fixtures/theories/15/dump +0 -0
  37. data/test/fixtures/theories/16/dump +0 -0
  38. data/test/fixtures/theories/17/dump +0 -0
  39. data/test/fixtures/theories/18/dump +0 -0
  40. data/test/fixtures/theories/19/dump +0 -0
  41. data/test/fixtures/theories/2/dump +0 -0
  42. data/test/fixtures/theories/20/dump +0 -0
  43. data/test/fixtures/theories/3/dump +0 -0
  44. data/test/fixtures/theories/4/dump +0 -0
  45. data/test/fixtures/theories/5/dump +0 -0
  46. data/test/fixtures/theories/6/dump +0 -0
  47. data/test/fixtures/theories/7/dump +0 -0
  48. data/test/fixtures/theories/8/dump +0 -0
  49. data/test/fixtures/theories/9/declaration.txt +1 -1
  50. data/test/fixtures/theories/9/desc +1 -1
  51. data/test/fixtures/theories/9/dump +0 -0
  52. data/test/ts_complete.rb +0 -1
  53. data/test/unit/core/runtime_method/tc_runtime_method.rb +0 -25
  54. data/test/unit/core/statement/tc_statement.rb +0 -52
  55. data/test/unit/core/tc_theory_generator.rb +2 -2
  56. data/test/unit/tc_theory.rb +2 -10
  57. data/test/unit/theory/tc_theory_action.rb +2 -6
  58. data/test/unit/util/tc_string_to_theory.rb +2 -2
  59. data/tmp/runtime_method_evaluation.rb +10 -7
  60. metadata +28 -30
  61. data/lib/core/runtime_class/IfStatementClass.rb +0 -12
  62. data/test/tc_contextual_variables.rb +0 -48
@@ -1,12 +0,0 @@
1
- # TODO I Don't think this class exists
2
- class IfStatementClass < ClassName
3
-
4
- def initialize
5
- super
6
- end
7
-
8
- def write(context=nil)
9
- return 'IfStatement'
10
- end
11
-
12
- end
@@ -1,48 +0,0 @@
1
- # This meant to test that the variables requirements change to reflect
2
- # the context they are accessed.
3
- #
4
-
5
- # TODO This can go!
6
-
7
- require 'required'
8
- require 'test/unit'
9
-
10
- class TestContextualVariable < Test::Unit::TestCase
11
-
12
- def setup
13
-
14
- end
15
-
16
- def teardown
17
- System.reset
18
- RuntimeMethod.reset_global_id
19
- end
20
-
21
- # This test checks the the declared variable in the following statement
22
- #
23
- # varA = varB-varC
24
- #
25
- # has the contextual requirement
26
- #
27
- # self = varB-varC
28
- #
29
- def test_declared_variables_in_statement_with_multiple_variables
30
-
31
- # Create the statement
32
- declared_variable = Unknown.new
33
- varB = Unknown.new
34
- varC = Unknown.new
35
- statement = Statement.new(declared_variable,Equal.new,varB,Subtract.new,varC)
36
-
37
- # Check the number of elmements in the statement
38
- assert_equal(5,statement.length)
39
-
40
- # Retrieve the contextual declared variable
41
- contextual_variable = statement.contextual_variable(declared_variable.variable_id)
42
-
43
- # Confirm a variable was returned
44
- assert(contextual_variable.kind_of?(Variable))
45
-
46
- end
47
-
48
- end