cauterize 0.0.1.pre13 → 0.0.1.pre14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +33 -33
  3. data/.rspec +1 -1
  4. data/.travisci.yml +4 -4
  5. data/Gemfile +4 -4
  6. data/LICENSE.txt +21 -21
  7. data/README.md +177 -177
  8. data/Rakefile +54 -54
  9. data/bin/cauterize +61 -61
  10. data/cauterize.gemspec +27 -27
  11. data/example/Cauterize +68 -68
  12. data/example/build.sh +25 -25
  13. data/example/c_example_support/empty_main.c +1 -1
  14. data/example/c_example_support/example_project_config.c +11 -11
  15. data/example/c_example_support/example_project_config.h +15 -15
  16. data/example/ruby_ex.rb +14 -14
  17. data/lib/cauterize.rb +117 -117
  18. data/lib/cauterize/base_type.rb +78 -78
  19. data/lib/cauterize/builders.rb +41 -41
  20. data/lib/cauterize/builders/c/buildable.rb +91 -91
  21. data/lib/cauterize/builders/c/builtin.rb +43 -43
  22. data/lib/cauterize/builders/c/composite.rb +57 -57
  23. data/lib/cauterize/builders/c/enumeration.rb +60 -60
  24. data/lib/cauterize/builders/c/fixed_array.rb +74 -74
  25. data/lib/cauterize/builders/c/group.rb +143 -143
  26. data/lib/cauterize/builders/c/scalar.rb +34 -34
  27. data/lib/cauterize/builders/c/variable_array.rb +98 -98
  28. data/lib/cauterize/builders/cs/buildable.rb +59 -59
  29. data/lib/cauterize/builders/cs/builtin.rb +22 -22
  30. data/lib/cauterize/builders/cs/composite.rb +21 -21
  31. data/lib/cauterize/builders/cs/csarray.rb +32 -32
  32. data/lib/cauterize/builders/cs/enumeration.rb +21 -21
  33. data/lib/cauterize/builders/cs/fixed_array.rb +27 -27
  34. data/lib/cauterize/builders/cs/group.rb +32 -32
  35. data/lib/cauterize/builders/cs/scalar.rb +10 -10
  36. data/lib/cauterize/builders/cs/variable_array.rb +40 -34
  37. data/lib/cauterize/builders/doc/buildable.rb +30 -30
  38. data/lib/cauterize/builders/doc/builtin.rb +21 -21
  39. data/lib/cauterize/builders/doc/composite.rb +23 -23
  40. data/lib/cauterize/builders/doc/enumeration.rb +24 -24
  41. data/lib/cauterize/builders/doc/fixed_array.rb +26 -26
  42. data/lib/cauterize/builders/doc/group.rb +29 -29
  43. data/lib/cauterize/builders/doc/scalar.rb +21 -21
  44. data/lib/cauterize/builders/doc/variable_array.rb +26 -26
  45. data/lib/cauterize/builders/ruby/buildable.rb +11 -11
  46. data/lib/cauterize/builders/ruby/builtin.rb +25 -25
  47. data/lib/cauterize/builders/ruby/composite.rb +26 -26
  48. data/lib/cauterize/builders/ruby/enumeration.rb +27 -27
  49. data/lib/cauterize/builders/ruby/fixed_array.rb +20 -20
  50. data/lib/cauterize/builders/ruby/group.rb +35 -35
  51. data/lib/cauterize/builders/ruby/scalar.rb +19 -19
  52. data/lib/cauterize/builders/ruby/variable_array.rb +22 -22
  53. data/lib/cauterize/builtin.rb +62 -62
  54. data/lib/cauterize/c_builder.rb +103 -103
  55. data/lib/cauterize/cauterize.rb +76 -76
  56. data/lib/cauterize/composite.rb +64 -64
  57. data/lib/cauterize/cs_builder.rb +58 -58
  58. data/lib/cauterize/doc_builder.rb +34 -34
  59. data/lib/cauterize/enumeration.rb +98 -98
  60. data/lib/cauterize/fixed_array.rb +50 -50
  61. data/lib/cauterize/formatter.rb +67 -67
  62. data/lib/cauterize/group.rb +81 -81
  63. data/lib/cauterize/representation.rb +32 -32
  64. data/lib/cauterize/ruby_builder.rb +44 -44
  65. data/lib/cauterize/scalar.rb +53 -53
  66. data/lib/cauterize/snake_case.rb +21 -21
  67. data/lib/cauterize/variable_array.rb +55 -55
  68. data/lib/cauterize/version.rb +3 -3
  69. data/spec/base_type_spec.rb +251 -251
  70. data/spec/builders/c/buildable_spec.rb +25 -25
  71. data/spec/builders/c/builtin_spec.rb +22 -22
  72. data/spec/builders/c/composite_spec.rb +50 -50
  73. data/spec/builders/c/enumeration_spec.rb +95 -95
  74. data/spec/builders/c/fixed_array_spec.rb +36 -36
  75. data/spec/builders/c/group_spec.rb +140 -140
  76. data/spec/builders/c/scalar_spec.rb +26 -26
  77. data/spec/builders/c/variable_array_spec.rb +48 -48
  78. data/spec/builders/cs/buildable_spec.rb +8 -8
  79. data/spec/builders/cs/composite_spec.rb +32 -32
  80. data/spec/builders/cs/enumeration_spec.rb +33 -33
  81. data/spec/builders/cs/fixed_array_spec.rb +41 -41
  82. data/spec/builders/cs/group_spec.rb +56 -56
  83. data/spec/builders/cs/scalar_spec.rb +7 -7
  84. data/spec/builders/cs/variable_array_spec.rb +49 -45
  85. data/spec/builders/doc/buildable_spec.rb +25 -25
  86. data/spec/builders_spec.rb +57 -57
  87. data/spec/builtin_spec.rb +43 -43
  88. data/spec/c_builder_spec.rb +176 -176
  89. data/spec/cauterize_spec.rb +15 -15
  90. data/spec/composite_spec.rb +77 -77
  91. data/spec/cs_builder_spec.rb +115 -115
  92. data/spec/doc_builder_spec.rb +260 -260
  93. data/spec/enumeration_spec.rb +145 -145
  94. data/spec/fixed_array_spec.rb +61 -61
  95. data/spec/group_spec.rb +111 -111
  96. data/spec/ruby_builder_spec.rb +83 -83
  97. data/spec/ruby_generated_spec.rb +735 -735
  98. data/spec/scalar_spec.rb +44 -44
  99. data/spec/spec_helper.rb +122 -122
  100. data/spec/support/shared_examples_for_array_buildables.rb +22 -22
  101. data/spec/support/shared_examples_for_c_buildables.rb +103 -103
  102. data/spec/support/shared_examples_for_sane_c_buildables.rb +22 -22
  103. data/spec/support/shared_examples_for_stubbed_functions.rb +18 -18
  104. data/spec/support/spec_sample_model.rb +74 -74
  105. data/spec/test_main.c +13 -13
  106. data/spec/variable_array_spec.rb +73 -73
  107. data/support/c/src/cauterize.c +75 -75
  108. data/support/c/src/cauterize.h +60 -60
  109. data/support/c/src/cauterize_debug.h +29 -29
  110. data/support/c/src/cauterize_util.h +8 -8
  111. data/support/c/test/greatest.h +536 -536
  112. data/support/c/test/test.c +166 -166
  113. data/support/cs/src/CauterizeCompositeFormatter.cs +0 -0
  114. data/support/cs/src/CauterizeContainerFormatter.cs +0 -0
  115. data/support/cs/src/CauterizeEnumFormatter.cs +0 -0
  116. data/support/cs/src/CauterizeException.cs +15 -15
  117. data/support/cs/src/CauterizeFixedArrayFormatter.cs +2 -2
  118. data/support/cs/src/CauterizeFormatter.cs +0 -0
  119. data/support/cs/src/CauterizeGroupFormatter.cs +0 -0
  120. data/support/cs/src/CauterizeTypeFormatterFactory.cs +0 -0
  121. data/support/cs/src/CauterizeTypes.cs +46 -12
  122. data/support/cs/src/CauterizeVariableArrayFormatter.cs +1 -1
  123. data/support/cs/src/ICauterizeTypeFormatter.cs +0 -0
  124. data/support/cs/src/OrderAttribute.cs +0 -0
  125. data/support/cs/src/PrimitiveSupport.cs +12 -0
  126. data/support/cs/test/CauterizeCompositeFormatterTest.cs +0 -0
  127. data/support/cs/test/CauterizeEnumFormatterTest.cs +0 -0
  128. data/support/cs/test/CauterizeFixedArrayFormatterTest.cs +0 -0
  129. data/support/cs/test/CauterizeFormatterTest.cs +0 -0
  130. data/support/cs/test/CauterizeGroupFormatterTest.cs +0 -0
  131. data/support/cs/test/CauterizeIntegrationTest.cs +0 -0
  132. data/support/cs/test/CauterizePrimitiveFormatterTest.cs +0 -0
  133. data/support/cs/test/CauterizeTypeFormatterFactoryTest.cs +0 -0
  134. data/support/cs/test/CauterizeVariableArrayFormatterTest.cs +0 -0
  135. data/support/cs/test/OrderAttributeTest.cs +0 -0
  136. data/support/ruby/src/cauterize_ruby_baseclasses.rb +367 -367
  137. data/support/ruby/src/cauterize_ruby_builtins.rb +148 -148
  138. metadata +20 -20
@@ -1,148 +1,148 @@
1
- require_relative './cauterize_ruby_baseclasses'
2
-
3
- module CauterizeRuby
4
- class UInt8 < BuiltinInteger
5
- def in_range(v) v >= 0 && v < 2**8 end
6
- def self.max_size() 1 end
7
- def cmp(other) to_ruby <=> other.to_ruby end
8
- def packio(x)
9
- x << [to_i].pack("C")
10
- end
11
- def self.unpackio(str)
12
- UInt8.new str.read(max_size).unpack("C")[0]
13
- end
14
- end
15
-
16
- class UInt16 < BuiltinInteger
17
- def in_range(v) v >= 0 && v < 2**16 end
18
- def self.max_size() 2 end
19
- def cmp(other) to_ruby <=> other.to_ruby end
20
- def packio(x)
21
- x << [to_i].pack("S")
22
- end
23
- def self.unpackio(str)
24
- UInt16.new str.read(max_size).unpack("S")[0]
25
- end
26
- end
27
-
28
- class UInt32 < BuiltinInteger
29
- def in_range(v) v >= 0 && v < 2**32 end
30
- def self.max_size() 4 end
31
- def cmp(other) to_ruby <=> other.to_ruby end
32
- def packio(x)
33
- x << [to_i].pack("L")
34
- end
35
- def self.unpackio(str)
36
- UInt32.new str.read(max_size).unpack("L")[0]
37
- end
38
- end
39
-
40
- class UInt64 < BuiltinInteger
41
- def in_range(v) v >= 0 && v < 2**64 end
42
- def self.max_size() 8 end
43
- def cmp(other) to_ruby <=> other.to_ruby end
44
- def packio(x)
45
- x << [to_i].pack("Q")
46
- end
47
- def self.unpackio(str)
48
- UInt64.new str.read(max_size).unpack("Q")[0]
49
- end
50
- end
51
-
52
- class Int8 < BuiltinInteger
53
- def in_range(v) (v >= -2**7) && (v < 2**7) end
54
- def self.max_size() 1 end
55
- def cmp(other) to_ruby <=> other.to_ruby end
56
- def packio(x)
57
- x << [to_i].pack("c")
58
- end
59
- def self.unpackio(str)
60
- Int8.new str.read(max_size).unpack("c")[0]
61
- end
62
- end
63
-
64
- class Int16 < BuiltinInteger
65
- def in_range(v) (v >= -2**15) && (v < 2**15) end
66
- def self.max_size() 2 end
67
- def cmp(other) to_ruby <=> other.to_ruby end
68
- def packio(x)
69
- x << [to_i].pack("s")
70
- end
71
- def self.unpackio(str)
72
- Int16.new str.read(max_size).unpack("s")[0]
73
- end
74
- end
75
-
76
- class Int32 < BuiltinInteger
77
- def in_range(v) (v >= -2**31) && (v < 2**31) end
78
- def self.max_size() 4 end
79
- def cmp(other) to_ruby <=> other.to_ruby end
80
- def packio(x)
81
- x << [to_i].pack("l")
82
- end
83
- def self.unpackio(str)
84
- Int32.new str.read(max_size).unpack("l")[0]
85
- end
86
- end
87
-
88
- class Int64 < BuiltinInteger
89
- def in_range(v) (v >= -2**63) && (v < 2**63) end
90
- def self.max_size() 8 end
91
- def cmp(other) to_ruby <=> other.to_ruby end
92
- def packio(x)
93
- x << [to_i].pack("q")
94
- end
95
- def self.unpackio(str)
96
- Int64.new str.read(max_size).unpack("q")[0]
97
- end
98
- end
99
-
100
- class Bool < BuiltinBool
101
- def in_range(v) true end
102
- def self.max_size() 1 end
103
- def cmp(other)
104
- return 0 if to_ruby == other.to_ruby
105
- return 1 if to_ruby
106
- return -1
107
- end
108
- def packio(x)
109
- x << if @val
110
- [1].pack("C")
111
- else
112
- [0].pack("C")
113
- end
114
- end
115
- def self.unpackio(str)
116
- if str.read(max_size).unpack("C")[0] == 0
117
- Bool.new false
118
- else
119
- Bool.new true
120
- end
121
- end
122
- end
123
-
124
- class Float32 < BuiltinFloat
125
- def in_range(v) [v].pack("f").unpack("f").first.finite? end
126
- def self.max_size() 4 end
127
- def cmp(other) to_ruby <=> other.to_ruby end
128
- def packio(x)
129
- x << [to_f].pack("f")
130
- end
131
- def self.unpackio(str)
132
- Float32.new str.read(max_size).unpack("f")[0]
133
- end
134
- end
135
-
136
- class Float64 < BuiltinFloat
137
- def in_range(v) true end
138
- def self.max_size() 8 end
139
- def cmp(other) to_ruby <=> other.to_ruby end
140
- def packio(x)
141
- x << [to_f].pack("d")
142
- end
143
- def self.unpackio(str)
144
- Float64.new str.read(max_size).unpack("d")[0]
145
- end
146
- end
147
- end
148
-
1
+ require_relative './cauterize_ruby_baseclasses'
2
+
3
+ module CauterizeRuby
4
+ class UInt8 < BuiltinInteger
5
+ def in_range(v) v >= 0 && v < 2**8 end
6
+ def self.max_size() 1 end
7
+ def cmp(other) to_ruby <=> other.to_ruby end
8
+ def packio(x)
9
+ x << [to_i].pack("C")
10
+ end
11
+ def self.unpackio(str)
12
+ UInt8.new str.read(max_size).unpack("C")[0]
13
+ end
14
+ end
15
+
16
+ class UInt16 < BuiltinInteger
17
+ def in_range(v) v >= 0 && v < 2**16 end
18
+ def self.max_size() 2 end
19
+ def cmp(other) to_ruby <=> other.to_ruby end
20
+ def packio(x)
21
+ x << [to_i].pack("S")
22
+ end
23
+ def self.unpackio(str)
24
+ UInt16.new str.read(max_size).unpack("S")[0]
25
+ end
26
+ end
27
+
28
+ class UInt32 < BuiltinInteger
29
+ def in_range(v) v >= 0 && v < 2**32 end
30
+ def self.max_size() 4 end
31
+ def cmp(other) to_ruby <=> other.to_ruby end
32
+ def packio(x)
33
+ x << [to_i].pack("L")
34
+ end
35
+ def self.unpackio(str)
36
+ UInt32.new str.read(max_size).unpack("L")[0]
37
+ end
38
+ end
39
+
40
+ class UInt64 < BuiltinInteger
41
+ def in_range(v) v >= 0 && v < 2**64 end
42
+ def self.max_size() 8 end
43
+ def cmp(other) to_ruby <=> other.to_ruby end
44
+ def packio(x)
45
+ x << [to_i].pack("Q")
46
+ end
47
+ def self.unpackio(str)
48
+ UInt64.new str.read(max_size).unpack("Q")[0]
49
+ end
50
+ end
51
+
52
+ class Int8 < BuiltinInteger
53
+ def in_range(v) (v >= -2**7) && (v < 2**7) end
54
+ def self.max_size() 1 end
55
+ def cmp(other) to_ruby <=> other.to_ruby end
56
+ def packio(x)
57
+ x << [to_i].pack("c")
58
+ end
59
+ def self.unpackio(str)
60
+ Int8.new str.read(max_size).unpack("c")[0]
61
+ end
62
+ end
63
+
64
+ class Int16 < BuiltinInteger
65
+ def in_range(v) (v >= -2**15) && (v < 2**15) end
66
+ def self.max_size() 2 end
67
+ def cmp(other) to_ruby <=> other.to_ruby end
68
+ def packio(x)
69
+ x << [to_i].pack("s")
70
+ end
71
+ def self.unpackio(str)
72
+ Int16.new str.read(max_size).unpack("s")[0]
73
+ end
74
+ end
75
+
76
+ class Int32 < BuiltinInteger
77
+ def in_range(v) (v >= -2**31) && (v < 2**31) end
78
+ def self.max_size() 4 end
79
+ def cmp(other) to_ruby <=> other.to_ruby end
80
+ def packio(x)
81
+ x << [to_i].pack("l")
82
+ end
83
+ def self.unpackio(str)
84
+ Int32.new str.read(max_size).unpack("l")[0]
85
+ end
86
+ end
87
+
88
+ class Int64 < BuiltinInteger
89
+ def in_range(v) (v >= -2**63) && (v < 2**63) end
90
+ def self.max_size() 8 end
91
+ def cmp(other) to_ruby <=> other.to_ruby end
92
+ def packio(x)
93
+ x << [to_i].pack("q")
94
+ end
95
+ def self.unpackio(str)
96
+ Int64.new str.read(max_size).unpack("q")[0]
97
+ end
98
+ end
99
+
100
+ class Bool < BuiltinBool
101
+ def in_range(v) true end
102
+ def self.max_size() 1 end
103
+ def cmp(other)
104
+ return 0 if to_ruby == other.to_ruby
105
+ return 1 if to_ruby
106
+ return -1
107
+ end
108
+ def packio(x)
109
+ x << if @val
110
+ [1].pack("C")
111
+ else
112
+ [0].pack("C")
113
+ end
114
+ end
115
+ def self.unpackio(str)
116
+ if str.read(max_size).unpack("C")[0] == 0
117
+ Bool.new false
118
+ else
119
+ Bool.new true
120
+ end
121
+ end
122
+ end
123
+
124
+ class Float32 < BuiltinFloat
125
+ def in_range(v) [v].pack("f").unpack("f").first.finite? end
126
+ def self.max_size() 4 end
127
+ def cmp(other) to_ruby <=> other.to_ruby end
128
+ def packio(x)
129
+ x << [to_f].pack("f")
130
+ end
131
+ def self.unpackio(str)
132
+ Float32.new str.read(max_size).unpack("f")[0]
133
+ end
134
+ end
135
+
136
+ class Float64 < BuiltinFloat
137
+ def in_range(v) true end
138
+ def self.max_size() 8 end
139
+ def cmp(other) to_ruby <=> other.to_ruby end
140
+ def packio(x)
141
+ x << [to_f].pack("d")
142
+ end
143
+ def self.unpackio(str)
144
+ Float64.new str.read(max_size).unpack("d")[0]
145
+ end
146
+ end
147
+ end
148
+
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cauterize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre13
4
+ version: 0.0.1.pre14
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Van Enk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
11
+ date: 2015-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.9.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.9.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: thor
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.16.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.16.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: require_all
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.2.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.2.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bindata
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.5'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: 2.12.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: 2.12.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: mocha
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.13.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.13.0
97
97
  description: Tools to generate C structures and marshalers with a Ruby DSL.
@@ -102,9 +102,9 @@ executables:
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
- - .gitignore
106
- - .rspec
107
- - .travisci.yml
105
+ - ".gitignore"
106
+ - ".rspec"
107
+ - ".travisci.yml"
108
108
  - Gemfile
109
109
  - LICENSE.txt
110
110
  - README.md
@@ -250,17 +250,17 @@ require_paths:
250
250
  - lib
251
251
  required_ruby_version: !ruby/object:Gem::Requirement
252
252
  requirements:
253
- - - '>='
253
+ - - ">="
254
254
  - !ruby/object:Gem::Version
255
255
  version: '0'
256
256
  required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  requirements:
258
- - - '>'
258
+ - - ">"
259
259
  - !ruby/object:Gem::Version
260
260
  version: 1.3.1
261
261
  requirements: []
262
262
  rubyforge_project:
263
- rubygems_version: 2.0.3
263
+ rubygems_version: 2.4.5
264
264
  signing_key:
265
265
  specification_version: 4
266
266
  summary: Tools to generate structures and mashalers suitable for static-memory environments.