prograph 1.3.3__py3-none-any.whl

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 (237) hide show
  1. prograph/__init__.py +36 -0
  2. prograph/__main__.py +5 -0
  3. prograph/_version.py +375 -0
  4. prograph/cli/__init__.py +1 -0
  5. prograph/cli/_iri_utils.py +124 -0
  6. prograph/cli/emit_genie_space.py +107 -0
  7. prograph/cli/generate_views.py +140 -0
  8. prograph/cli/main.py +420 -0
  9. prograph/cli/schema_inferrer.py +746 -0
  10. prograph/cli/ttl_loader.py +289 -0
  11. prograph/cli/upload_genie_space.py +84 -0
  12. prograph/config/__init__.py +27 -0
  13. prograph/config/yaml_config.py +848 -0
  14. prograph/demos/__init__.py +14 -0
  15. prograph/demos/turbofan/README.md +74 -0
  16. prograph/demos/turbofan/SCENARIO.md +209 -0
  17. prograph/demos/turbofan/__init__.py +75 -0
  18. prograph/demos/turbofan/create_tables.sql +206 -0
  19. prograph/demos/turbofan/data/engine-instances.ttl +1123 -0
  20. prograph/demos/turbofan/data/sensor-timeseries.csv +90 -0
  21. prograph/demos/turbofan/demo.py +162 -0
  22. prograph/demos/turbofan/genie_qa_notebook.py +434 -0
  23. prograph/demos/turbofan/graph.yaml +1098 -0
  24. prograph/demos/turbofan/instance_graph_demo.py +32 -0
  25. prograph/demos/turbofan/load.py +223 -0
  26. prograph/demos/turbofan/mapping.r2rml.ttl +991 -0
  27. prograph/demos/turbofan/ontology/engine-maintenance.ttl +606 -0
  28. prograph/demos/turbofan/payload-shapes.ttl +33 -0
  29. prograph/demos/turbofan/queries/example-queries.sparql +215 -0
  30. prograph/demos/turbofan/shapes.ttl +75 -0
  31. prograph/demos/turbofan/tables.py +106 -0
  32. prograph/demos/turbofan/turbofan_schema.py +393 -0
  33. prograph/demos/turbofan/validation_demo.py +153 -0
  34. prograph/describe.py +231 -0
  35. prograph/endpoint/__init__.py +12 -0
  36. prograph/endpoint/app.py +722 -0
  37. prograph/endpoint/cli.py +280 -0
  38. prograph/endpoint/credentials.py +240 -0
  39. prograph/endpoint/engines.py +418 -0
  40. prograph/endpoint/negotiate.py +101 -0
  41. prograph/endpoint/results.py +181 -0
  42. prograph/endpoint/service.py +31 -0
  43. prograph/engine.py +2718 -0
  44. prograph/execution.py +455 -0
  45. prograph/executors/__init__.py +6 -0
  46. prograph/executors/base.py +11 -0
  47. prograph/executors/databricks_sql_executor.py +51 -0
  48. prograph/executors/duckdb_executor.py +24 -0
  49. prograph/executors/mysql_executor.py +20 -0
  50. prograph/executors/oracle_executor.py +24 -0
  51. prograph/executors/pandas_executor.py +72 -0
  52. prograph/executors/postgresql_executor.py +35 -0
  53. prograph/executors/spark_executor.py +88 -0
  54. prograph/executors/sqlserver_executor.py +35 -0
  55. prograph/extras/__init__.py +1 -0
  56. prograph/extras/graphql/__init__.py +33 -0
  57. prograph/extras/graphql/execute.py +25 -0
  58. prograph/extras/graphql/schema.py +314 -0
  59. prograph/extras/instance_graph.py +559 -0
  60. prograph/genie/__init__.py +83 -0
  61. prograph/genie/databricks_uploader.py +306 -0
  62. prograph/genie/deploy.py +393 -0
  63. prograph/genie/formats.py +414 -0
  64. prograph/genie/instruction_generator.py +375 -0
  65. prograph/genie/sample_query_generator.py +256 -0
  66. prograph/genie/shacl_views.py +318 -0
  67. prograph/genie/space_emitter.py +329 -0
  68. prograph/genie/view_generator.py +628 -0
  69. prograph/genie/view_writer.py +172 -0
  70. prograph/graph/__init__.py +1 -0
  71. prograph/graph/ansi_session.py +348 -0
  72. prograph/graph/databricks_sql_graph.py +300 -0
  73. prograph/graph/drivers.py +143 -0
  74. prograph/graph/duckdb_graph.py +68 -0
  75. prograph/graph/mysql_graph.py +38 -0
  76. prograph/graph/oracle_graph.py +285 -0
  77. prograph/graph/pandas_graph.py +343 -0
  78. prograph/graph/postgresql_graph.py +644 -0
  79. prograph/graph/spark_graph.py +556 -0
  80. prograph/graph/sql_graph.py +83 -0
  81. prograph/graph/sqlserver_graph.py +72 -0
  82. prograph/hints.py +95 -0
  83. prograph/logging.py +550 -0
  84. prograph/mcp/__init__.py +29 -0
  85. prograph/mcp/__main__.py +180 -0
  86. prograph/mcp/bootstrap.py +98 -0
  87. prograph/mcp/server.py +601 -0
  88. prograph/mcp/sparql.py +397 -0
  89. prograph/mcp/tools.py +504 -0
  90. prograph/nlp/__init__.py +79 -0
  91. prograph/nlp/client.py +305 -0
  92. prograph/nlp/databricks_tools.py +369 -0
  93. prograph/nlp/graph_context.py +313 -0
  94. prograph/nlp/interface.py +652 -0
  95. prograph/nlp/prompts/__init__.py +19 -0
  96. prograph/nlp/prompts/examples.py +258 -0
  97. prograph/nlp/prompts/system.py +239 -0
  98. prograph/nlp/providers/__init__.py +14 -0
  99. prograph/nlp/providers/anthropic.py +274 -0
  100. prograph/nlp/providers/databricks.py +312 -0
  101. prograph/nlp/providers/openai.py +203 -0
  102. prograph/nlp/schema_context.py +78 -0
  103. prograph/ontology/__init__.py +53 -0
  104. prograph/ontology/alignment.py +542 -0
  105. prograph/ontology/hierarchy.py +310 -0
  106. prograph/ontology/imports.py +587 -0
  107. prograph/ontology/layer.py +991 -0
  108. prograph/ontology/skos.py +61 -0
  109. prograph/owl/__init__.py +27 -0
  110. prograph/owl/defined_classes.py +323 -0
  111. prograph/parameters.py +242 -0
  112. prograph/parser/__init__.py +1 -0
  113. prograph/parser/cypher/CypherLexer.py +836 -0
  114. prograph/parser/cypher/CypherListener.py +966 -0
  115. prograph/parser/cypher/CypherParser.py +10854 -0
  116. prograph/parser/cypher/CypherVisitor.py +543 -0
  117. prograph/parser/cypher/__init__.py +1 -0
  118. prograph/parser/sparql/SparqlLexer.py +801 -0
  119. prograph/parser/sparql/SparqlParser.py +10146 -0
  120. prograph/parser/sparql/SparqlParserListener.py +1056 -0
  121. prograph/parser/sparql/SparqlParserVisitor.py +593 -0
  122. prograph/parser/sparql/__init__.py +8 -0
  123. prograph/plan/__init__.py +3 -0
  124. prograph/plan/ir/__init__.py +1 -0
  125. prograph/plan/ir/casts.py +338 -0
  126. prograph/plan/ir/consistency.py +397 -0
  127. prograph/plan/ir/construct.py +90 -0
  128. prograph/plan/ir/cost.py +234 -0
  129. prograph/plan/ir/cypher_answer.py +1081 -0
  130. prograph/plan/ir/cypher_apoc.py +717 -0
  131. prograph/plan/ir/cypher_apoc_convert.py +505 -0
  132. prograph/plan/ir/cypher_apoc_date.py +845 -0
  133. prograph/plan/ir/cypher_apoc_map.py +496 -0
  134. prograph/plan/ir/cypher_apoc_meta.py +384 -0
  135. prograph/plan/ir/cypher_apoc_path.py +597 -0
  136. prograph/plan/ir/cypher_apoc_procedures.py +163 -0
  137. prograph/plan/ir/cypher_apoc_text.py +785 -0
  138. prograph/plan/ir/cypher_front.py +5474 -0
  139. prograph/plan/ir/cypher_functions.py +565 -0
  140. prograph/plan/ir/cypher_lists.py +935 -0
  141. prograph/plan/ir/cypher_maps.py +370 -0
  142. prograph/plan/ir/cypher_mixed.py +604 -0
  143. prograph/plan/ir/cypher_ontology.py +226 -0
  144. prograph/plan/ir/cypher_procedures.py +191 -0
  145. prograph/plan/ir/cypher_runtime_errors.py +107 -0
  146. prograph/plan/ir/cypher_temporal.py +1357 -0
  147. prograph/plan/ir/cypher_temporal_arith.py +339 -0
  148. prograph/plan/ir/cypher_values.py +546 -0
  149. prograph/plan/ir/cypher_write.py +612 -0
  150. prograph/plan/ir/dataset.py +643 -0
  151. prograph/plan/ir/dates.py +102 -0
  152. prograph/plan/ir/entry.py +992 -0
  153. prograph/plan/ir/expr.py +260 -0
  154. prograph/plan/ir/facts.py +1171 -0
  155. prograph/plan/ir/fresh.py +291 -0
  156. prograph/plan/ir/freshness.py +625 -0
  157. prograph/plan/ir/identity.py +797 -0
  158. prograph/plan/ir/java_datetime.py +265 -0
  159. prograph/plan/ir/java_regex.py +391 -0
  160. prograph/plan/ir/join_order.py +39 -0
  161. prograph/plan/ir/key_checks.py +433 -0
  162. prograph/plan/ir/keys.py +454 -0
  163. prograph/plan/ir/lower.py +5323 -0
  164. prograph/plan/ir/ops.py +619 -0
  165. prograph/plan/ir/owl_rl.py +1119 -0
  166. prograph/plan/ir/owl_rl_rules.py +725 -0
  167. prograph/plan/ir/profiles.py +694 -0
  168. prograph/plan/ir/ql.py +987 -0
  169. prograph/plan/ir/rdfs.py +342 -0
  170. prograph/plan/ir/rewrite.py +1782 -0
  171. prograph/plan/ir/saturate.py +339 -0
  172. prograph/plan/ir/semantics.py +103 -0
  173. prograph/plan/ir/slot.py +509 -0
  174. prograph/plan/ir/sparql_front.py +3418 -0
  175. prograph/plan/ir/strings.py +534 -0
  176. prograph/plan/ir/term_functions.py +274 -0
  177. prograph/plan/ir/terms.py +84 -0
  178. prograph/plan/ir/xpath_regex.py +264 -0
  179. prograph/plan/run_record.py +65 -0
  180. prograph/plan/sql/__init__.py +21 -0
  181. prograph/plan/sql/dialect.py +3726 -0
  182. prograph/plan/sql/mysql_serializer.py +103 -0
  183. prograph/plan/sql/names.py +65 -0
  184. prograph/plan/sql/oracle_serializer.py +306 -0
  185. prograph/plan/sql/pg_serializer.py +501 -0
  186. prograph/plan/sql/rel_algebra.py +781 -0
  187. prograph/plan/sql/sql_serializer.py +1419 -0
  188. prograph/plan/sql/sqlserver_serializer.py +603 -0
  189. prograph/provenance.py +222 -0
  190. prograph/r2rml/__init__.py +48 -0
  191. prograph/r2rml/catalog.py +259 -0
  192. prograph/r2rml/compile.py +372 -0
  193. prograph/r2rml/direct.py +140 -0
  194. prograph/r2rml/export.py +495 -0
  195. prograph/r2rml/model.py +180 -0
  196. prograph/r2rml/parser.py +546 -0
  197. prograph/r2rml/schema.py +120 -0
  198. prograph/read_only.py +122 -0
  199. prograph/results.py +157 -0
  200. prograph/rules/__init__.py +168 -0
  201. prograph/rules/__main__.py +32 -0
  202. prograph/schema/__init__.py +60 -0
  203. prograph/schema/change_set.py +50 -0
  204. prograph/schema/collations.py +198 -0
  205. prograph/schema/compile_schema.py +388 -0
  206. prograph/schema/context.py +845 -0
  207. prograph/schema/examples.py +234 -0
  208. prograph/schema/iri.py +817 -0
  209. prograph/schema/literals.py +94 -0
  210. prograph/schema/lpg_view.py +617 -0
  211. prograph/schema/mapping.py +1803 -0
  212. prograph/schema/maps_schema.py +40 -0
  213. prograph/schema/naming.py +77 -0
  214. prograph/schema/query_sources.py +59 -0
  215. prograph/schema/rows.py +215 -0
  216. prograph/schema/source_map.py +1103 -0
  217. prograph/schema/store_view.py +459 -0
  218. prograph/schema/types.py +569 -0
  219. prograph/schema/xsd.py +569 -0
  220. prograph/shacl/__init__.py +30 -0
  221. prograph/shacl/dqv.py +58 -0
  222. prograph/shacl/generate.py +255 -0
  223. prograph/shacl/report.py +138 -0
  224. prograph/shacl/validator.py +164 -0
  225. prograph/store.py +1737 -0
  226. prograph/utils/__init__.py +6 -0
  227. prograph/utils/exceptions.py +308 -0
  228. prograph/utils/helpers.py +126 -0
  229. prograph/warnings.py +46 -0
  230. prograph/writes.py +369 -0
  231. prograph-1.3.3.dist-info/METADATA +281 -0
  232. prograph-1.3.3.dist-info/RECORD +237 -0
  233. prograph-1.3.3.dist-info/WHEEL +5 -0
  234. prograph-1.3.3.dist-info/entry_points.txt +3 -0
  235. prograph-1.3.3.dist-info/licenses/LICENSE +201 -0
  236. prograph-1.3.3.dist-info/licenses/NOTICE +10 -0
  237. prograph-1.3.3.dist-info/top_level.txt +1 -0
@@ -0,0 +1,606 @@
1
+ @prefix : <http://example.org/engine-maintenance#> .
2
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
7
+
8
+ # =============================================================================
9
+ # Ontology Declaration
10
+ # =============================================================================
11
+
12
+ <http://example.org/engine-maintenance> a owl:Ontology ;
13
+ rdfs:label "Aircraft Engine Predictive Maintenance Ontology" ;
14
+ rdfs:comment """Ontology for modeling aircraft turbofan engine assemblies,
15
+ their sub-components, sensor instrumentation, degradation modes, and
16
+ maintenance actions. Designed for use with OWL DL reasoning (class
17
+ hierarchy, property chains, domain/range restrictions) and PSL
18
+ probabilistic inference (wear propagation, failure prediction).""" ;
19
+ owl:versionInfo "1.0.0" .
20
+
21
+ # =============================================================================
22
+ # Class Hierarchy: Physical Structure
23
+ # =============================================================================
24
+
25
+ :PhysicalEntity a owl:Class ;
26
+ rdfs:label "Physical Entity" ;
27
+ rdfs:comment "Any tangible object in the engine system." .
28
+
29
+ :Engine a owl:Class ;
30
+ rdfs:subClassOf :PhysicalEntity ;
31
+ rdfs:label "Engine" ;
32
+ rdfs:comment "Top-level turbofan engine assembly." .
33
+
34
+ :Module a owl:Class ;
35
+ rdfs:subClassOf :PhysicalEntity ;
36
+ rdfs:label "Module" ;
37
+ rdfs:comment "Major functional module of the engine (e.g., fan, compressor, turbine)." .
38
+
39
+ :Component a owl:Class ;
40
+ rdfs:subClassOf :PhysicalEntity ;
41
+ rdfs:label "Component" ;
42
+ rdfs:comment "Individual part within a module (e.g., blade, bearing, seal)." .
43
+
44
+ # --- Module subtypes ---
45
+
46
+ :FanModule a owl:Class ;
47
+ rdfs:subClassOf :Module ;
48
+ rdfs:label "Fan Module" .
49
+
50
+ :LowPressureCompressor a owl:Class ;
51
+ rdfs:subClassOf :Module ;
52
+ rdfs:label "Low-Pressure Compressor" .
53
+
54
+ :HighPressureCompressor a owl:Class ;
55
+ rdfs:subClassOf :Module ;
56
+ rdfs:label "High-Pressure Compressor" .
57
+
58
+ :CombustionChamber a owl:Class ;
59
+ rdfs:subClassOf :Module ;
60
+ rdfs:label "Combustion Chamber" .
61
+
62
+ :HighPressureTurbine a owl:Class ;
63
+ rdfs:subClassOf :Module ;
64
+ rdfs:label "High-Pressure Turbine" .
65
+
66
+ :LowPressureTurbine a owl:Class ;
67
+ rdfs:subClassOf :Module ;
68
+ rdfs:label "Low-Pressure Turbine" .
69
+
70
+ :ExhaustNozzle a owl:Class ;
71
+ rdfs:subClassOf :Module ;
72
+ rdfs:label "Exhaust Nozzle" .
73
+
74
+ :AccessoryGearbox a owl:Class ;
75
+ rdfs:subClassOf :Module ;
76
+ rdfs:label "Accessory Gearbox" .
77
+
78
+ :OilSystem a owl:Class ;
79
+ rdfs:subClassOf :Module ;
80
+ rdfs:label "Oil System" .
81
+
82
+ :FuelSystem a owl:Class ;
83
+ rdfs:subClassOf :Module ;
84
+ rdfs:label "Fuel System" .
85
+
86
+ # --- Component subtypes ---
87
+
88
+ :Blade a owl:Class ;
89
+ rdfs:subClassOf :Component ;
90
+ rdfs:label "Blade" ;
91
+ rdfs:comment "Rotating airfoil (fan blade, compressor blade, turbine blade)." .
92
+
93
+ :Disk a owl:Class ;
94
+ rdfs:subClassOf :Component ;
95
+ rdfs:label "Disk" ;
96
+ rdfs:comment "Rotating disk to which blades are attached." .
97
+
98
+ :Shaft a owl:Class ;
99
+ rdfs:subClassOf :Component ;
100
+ rdfs:label "Shaft" ;
101
+ rdfs:comment "Rotating shaft connecting turbine to compressor/fan." .
102
+
103
+ :Bearing a owl:Class ;
104
+ rdfs:subClassOf :Component ;
105
+ rdfs:label "Bearing" ;
106
+ rdfs:comment "Roller or ball bearing supporting a rotating shaft." .
107
+
108
+ :Seal a owl:Class ;
109
+ rdfs:subClassOf :Component ;
110
+ rdfs:label "Seal" ;
111
+ rdfs:comment "Labyrinth or carbon seal preventing fluid leakage." .
112
+
113
+ :Combustor a owl:Class ;
114
+ rdfs:subClassOf :Component ;
115
+ rdfs:label "Combustor Liner" ;
116
+ rdfs:comment "Liner or dome inside the combustion chamber." .
117
+
118
+ :FuelNozzle a owl:Class ;
119
+ rdfs:subClassOf :Component ;
120
+ rdfs:label "Fuel Nozzle" .
121
+
122
+ :OilPump a owl:Class ;
123
+ rdfs:subClassOf :Component ;
124
+ rdfs:label "Oil Pump" .
125
+
126
+ :OilFilter a owl:Class ;
127
+ rdfs:subClassOf :Component ;
128
+ rdfs:label "Oil Filter" .
129
+
130
+ :HeatExchanger a owl:Class ;
131
+ rdfs:subClassOf :Component ;
132
+ rdfs:label "Heat Exchanger" .
133
+
134
+ :FADEC a owl:Class ;
135
+ rdfs:subClassOf :Component ;
136
+ rdfs:label "FADEC" ;
137
+ rdfs:comment "Full Authority Digital Engine Control unit." .
138
+
139
+ :Vane a owl:Class ;
140
+ rdfs:subClassOf :Component ;
141
+ rdfs:label "Vane" ;
142
+ rdfs:comment "Stationary airfoil (stator vane, inlet guide vane)." .
143
+
144
+ # =============================================================================
145
+ # Class Hierarchy: Sensors & Measurements
146
+ # =============================================================================
147
+
148
+ :Sensor a owl:Class ;
149
+ rdfs:label "Sensor" ;
150
+ rdfs:comment "Physical sensing device installed on or near a component." .
151
+
152
+ :VibrationSensor a owl:Class ;
153
+ rdfs:subClassOf :Sensor ;
154
+ rdfs:label "Vibration Sensor" .
155
+
156
+ :TemperatureSensor a owl:Class ;
157
+ rdfs:subClassOf :Sensor ;
158
+ rdfs:label "Temperature Sensor" .
159
+
160
+ :PressureSensor a owl:Class ;
161
+ rdfs:subClassOf :Sensor ;
162
+ rdfs:label "Pressure Sensor" .
163
+
164
+ :SpeedSensor a owl:Class ;
165
+ rdfs:subClassOf :Sensor ;
166
+ rdfs:label "Speed Sensor (RPM)" .
167
+
168
+ :OilDebrisSensor a owl:Class ;
169
+ rdfs:subClassOf :Sensor ;
170
+ rdfs:label "Oil Debris Sensor" ;
171
+ rdfs:comment "Detects metallic particles in oil: proxy for wear." .
172
+
173
+ :FlowSensor a owl:Class ;
174
+ rdfs:subClassOf :Sensor ;
175
+ rdfs:label "Flow Sensor" .
176
+
177
+ :SensorReading a owl:Class ;
178
+ rdfs:label "Sensor Reading" ;
179
+ rdfs:comment "A single time-stamped observation from a sensor." .
180
+
181
+ # =============================================================================
182
+ # Class Hierarchy: Degradation & Failure
183
+ # =============================================================================
184
+
185
+ :DegradationMode a owl:Class ;
186
+ rdfs:label "Degradation Mode" ;
187
+ rdfs:comment "A named pattern of wear or deterioration." .
188
+
189
+ :Erosion a owl:Class ;
190
+ rdfs:subClassOf :DegradationMode ;
191
+ rdfs:label "Erosion" .
192
+
193
+ :Corrosion a owl:Class ;
194
+ rdfs:subClassOf :DegradationMode ;
195
+ rdfs:label "Corrosion" .
196
+
197
+ :FatigueCracking a owl:Class ;
198
+ rdfs:subClassOf :DegradationMode ;
199
+ rdfs:label "Fatigue Cracking" .
200
+
201
+ :ThermalDegradation a owl:Class ;
202
+ rdfs:subClassOf :DegradationMode ;
203
+ rdfs:label "Thermal Degradation" .
204
+
205
+ :ForeignObjectDamage a owl:Class ;
206
+ rdfs:subClassOf :DegradationMode ;
207
+ rdfs:label "Foreign Object Damage (FOD)" .
208
+
209
+ :WearAbrasion a owl:Class ;
210
+ rdfs:subClassOf :DegradationMode ;
211
+ rdfs:label "Wear / Abrasion" .
212
+
213
+ :SealLeakage a owl:Class ;
214
+ rdfs:subClassOf :DegradationMode ;
215
+ rdfs:label "Seal Leakage" .
216
+
217
+ :CarbonBuildup a owl:Class ;
218
+ rdfs:subClassOf :DegradationMode ;
219
+ rdfs:label "Carbon Buildup" .
220
+
221
+ :HealthState a owl:Class ;
222
+ rdfs:label "Health State" ;
223
+ rdfs:comment "Discrete classification of component condition." .
224
+
225
+ :Normal a owl:Class ;
226
+ rdfs:subClassOf :HealthState ;
227
+ rdfs:label "Normal" .
228
+
229
+ :Watch a owl:Class ;
230
+ rdfs:subClassOf :HealthState ;
231
+ rdfs:label "Watch" ;
232
+ rdfs:comment "Early indicators: increased monitoring recommended." .
233
+
234
+ :Advisory a owl:Class ;
235
+ rdfs:subClassOf :HealthState ;
236
+ rdfs:label "Advisory" ;
237
+ rdfs:comment "Degradation detected: schedule maintenance." .
238
+
239
+ :Warning a owl:Class ;
240
+ rdfs:subClassOf :HealthState ;
241
+ rdfs:label "Warning" ;
242
+ rdfs:comment "Significant degradation: maintenance required soon." .
243
+
244
+ :Critical a owl:Class ;
245
+ rdfs:subClassOf :HealthState ;
246
+ rdfs:label "Critical" ;
247
+ rdfs:comment "Imminent failure: ground aircraft." .
248
+
249
+ # =============================================================================
250
+ # Class Hierarchy: Maintenance Actions
251
+ # =============================================================================
252
+
253
+ :MaintenanceAction a owl:Class ;
254
+ rdfs:label "Maintenance Action" ;
255
+ rdfs:comment "A repair, inspection, or replacement activity." .
256
+
257
+ :Inspection a owl:Class ;
258
+ rdfs:subClassOf :MaintenanceAction ;
259
+ rdfs:label "Inspection" .
260
+
261
+ :BoroscopeInspection a owl:Class ;
262
+ rdfs:subClassOf :Inspection ;
263
+ rdfs:label "Boroscope Inspection" .
264
+
265
+ :OilAnalysis a owl:Class ;
266
+ rdfs:subClassOf :Inspection ;
267
+ rdfs:label "Oil Analysis" .
268
+
269
+ :Repair a owl:Class ;
270
+ rdfs:subClassOf :MaintenanceAction ;
271
+ rdfs:label "Repair" .
272
+
273
+ :BlendRepair a owl:Class ;
274
+ rdfs:subClassOf :Repair ;
275
+ rdfs:label "Blend Repair" ;
276
+ rdfs:comment "Material blending to smooth out nicks/dents on blades." .
277
+
278
+ :Replacement a owl:Class ;
279
+ rdfs:subClassOf :MaintenanceAction ;
280
+ rdfs:label "Replacement" .
281
+
282
+ :ShopVisit a owl:Class ;
283
+ rdfs:subClassOf :MaintenanceAction ;
284
+ rdfs:label "Shop Visit" ;
285
+ rdfs:comment "Full module or engine removal for overhaul." .
286
+
287
+ :ScheduledOverhaul a owl:Class ;
288
+ rdfs:subClassOf :ShopVisit ;
289
+ rdfs:label "Scheduled Overhaul" .
290
+
291
+ # =============================================================================
292
+ # Class Hierarchy: Operational Context
293
+ # =============================================================================
294
+
295
+ :Fleet a owl:Class ;
296
+ rdfs:label "Fleet" .
297
+
298
+ :Aircraft a owl:Class ;
299
+ rdfs:label "Aircraft" .
300
+
301
+ :FlightCycle a owl:Class ;
302
+ rdfs:label "Flight Cycle" ;
303
+ rdfs:comment "One takeoff-cruise-landing cycle." .
304
+
305
+ :OperatingEnvironment a owl:Class ;
306
+ rdfs:label "Operating Environment" ;
307
+ rdfs:comment "Environmental context (desert, maritime, arctic, etc.)." .
308
+
309
+ # =============================================================================
310
+ # Object Properties: Mereological (part-whole)
311
+ # =============================================================================
312
+
313
+ :hasPart a owl:ObjectProperty, owl:TransitiveProperty ;
314
+ rdfs:label "has part" ;
315
+ rdfs:comment "Mereological containment: X hasPart Y means Y is a sub-assembly of X." ;
316
+ owl:inverseOf :isPartOf .
317
+
318
+ :isPartOf a owl:ObjectProperty, owl:TransitiveProperty ;
319
+ rdfs:label "is part of" .
320
+
321
+ :hasDirectPart a owl:ObjectProperty ;
322
+ rdfs:subPropertyOf :hasPart ;
323
+ rdfs:label "has direct part" ;
324
+ rdfs:comment "Immediate (non-transitive) part relationship." .
325
+
326
+ # =============================================================================
327
+ # Object Properties: Topology & Dependency
328
+ # =============================================================================
329
+
330
+ :connectedTo a owl:ObjectProperty, owl:SymmetricProperty ;
331
+ rdfs:label "connected to" ;
332
+ rdfs:comment "Physical adjacency: fluid, gas, or mechanical path." .
333
+
334
+ :drivesShaft a owl:ObjectProperty ;
335
+ rdfs:subPropertyOf :connectedTo ;
336
+ rdfs:label "drives shaft" ;
337
+ rdfs:comment "Turbine drives compressor/fan via shaft." .
338
+
339
+ :receivesDriveFrom a owl:ObjectProperty ;
340
+ owl:inverseOf :drivesShaft ;
341
+ rdfs:label "receives drive from" .
342
+
343
+ :functionallyDependsOn a owl:ObjectProperty ;
344
+ rdfs:label "functionally depends on" ;
345
+ rdfs:comment "If Y degrades, X is affected." .
346
+
347
+ :suppliesFluidTo a owl:ObjectProperty ;
348
+ rdfs:subPropertyOf :connectedTo ;
349
+ rdfs:label "supplies fluid to" .
350
+
351
+ :downstreamOf a owl:ObjectProperty, owl:TransitiveProperty ;
352
+ rdfs:label "downstream of" ;
353
+ rdfs:comment "In the gas path: X is downstream of Y." .
354
+
355
+ # =============================================================================
356
+ # Object Properties: Sensing & Monitoring
357
+ # =============================================================================
358
+
359
+ :monitors a owl:ObjectProperty ;
360
+ rdfs:label "monitors" ;
361
+ rdfs:domain :Sensor ;
362
+ rdfs:range :PhysicalEntity ;
363
+ rdfs:comment "The sensor observes this component or module." .
364
+
365
+ :installedOn a owl:ObjectProperty ;
366
+ rdfs:label "installed on" ;
367
+ rdfs:domain :Sensor ;
368
+ rdfs:range :PhysicalEntity .
369
+
370
+ :hasReading a owl:ObjectProperty ;
371
+ rdfs:label "has reading" ;
372
+ rdfs:domain :Sensor ;
373
+ rdfs:range :SensorReading .
374
+
375
+ # =============================================================================
376
+ # Object Properties: Degradation & Health
377
+ # =============================================================================
378
+
379
+ :exhibitsDegradation a owl:ObjectProperty ;
380
+ rdfs:label "exhibits degradation" ;
381
+ rdfs:domain :PhysicalEntity ;
382
+ rdfs:range :DegradationMode .
383
+
384
+ :hasHealthState a owl:ObjectProperty ;
385
+ rdfs:label "has health state" ;
386
+ rdfs:domain :PhysicalEntity ;
387
+ rdfs:range :HealthState ;
388
+ rdfs:comment "Current assessed condition." .
389
+
390
+ :susceptibleTo a owl:ObjectProperty ;
391
+ rdfs:label "susceptible to" ;
392
+ rdfs:domain :Component ;
393
+ rdfs:range :DegradationMode ;
394
+ rdfs:comment "Known failure mode for this component type." .
395
+
396
+ :indicatedBy a owl:ObjectProperty ;
397
+ rdfs:label "indicated by" ;
398
+ rdfs:domain :DegradationMode ;
399
+ rdfs:range :Sensor ;
400
+ rdfs:comment "Which sensors can detect this degradation mode." .
401
+
402
+ :propagatesTo a owl:ObjectProperty ;
403
+ rdfs:label "propagates to" ;
404
+ rdfs:comment "Degradation in X can cause or accelerate degradation in Y." ;
405
+ rdfs:domain :PhysicalEntity ;
406
+ rdfs:range :PhysicalEntity .
407
+
408
+ # =============================================================================
409
+ # Object Properties: Maintenance
410
+ # =============================================================================
411
+
412
+ :requiresAction a owl:ObjectProperty ;
413
+ rdfs:label "requires action" ;
414
+ rdfs:domain :PhysicalEntity ;
415
+ rdfs:range :MaintenanceAction .
416
+
417
+ :addressesDegradation a owl:ObjectProperty ;
418
+ rdfs:label "addresses degradation" ;
419
+ rdfs:domain :MaintenanceAction ;
420
+ rdfs:range :DegradationMode .
421
+
422
+ :performedOn a owl:ObjectProperty ;
423
+ rdfs:label "performed on" ;
424
+ rdfs:domain :MaintenanceAction ;
425
+ rdfs:range :PhysicalEntity .
426
+
427
+ :triggeredBy a owl:ObjectProperty ;
428
+ rdfs:label "triggered by" ;
429
+ rdfs:domain :MaintenanceAction ;
430
+ rdfs:range :SensorReading .
431
+
432
+ # =============================================================================
433
+ # Object Properties: Operational
434
+ # =============================================================================
435
+
436
+ :belongsToFleet a owl:ObjectProperty ;
437
+ rdfs:domain :Aircraft ;
438
+ rdfs:range :Fleet .
439
+
440
+ :installedOnAircraft a owl:ObjectProperty ;
441
+ rdfs:domain :Engine ;
442
+ rdfs:range :Aircraft .
443
+
444
+ :operatesIn a owl:ObjectProperty ;
445
+ rdfs:domain :Engine ;
446
+ rdfs:range :OperatingEnvironment .
447
+
448
+ # =============================================================================
449
+ # Data Properties
450
+ # =============================================================================
451
+
452
+ # --- Identifiers ---
453
+ :serialNumber a owl:DatatypeProperty, owl:FunctionalProperty ;
454
+ rdfs:domain :PhysicalEntity ;
455
+ rdfs:range xsd:string .
456
+
457
+ :sensorId a owl:DatatypeProperty, owl:FunctionalProperty ;
458
+ rdfs:domain :Sensor ;
459
+ rdfs:range xsd:string .
460
+
461
+ # --- Operational Counters ---
462
+ :totalCyclesSinceNew a owl:DatatypeProperty ;
463
+ rdfs:domain :PhysicalEntity ;
464
+ rdfs:range xsd:integer ;
465
+ rdfs:comment "Cumulative flight cycles since manufacturing." .
466
+
467
+ :totalHoursSinceNew a owl:DatatypeProperty ;
468
+ rdfs:domain :PhysicalEntity ;
469
+ rdfs:range xsd:decimal ;
470
+ rdfs:comment "Cumulative flight hours since manufacturing." .
471
+
472
+ :cyclesSinceLastOverhaul a owl:DatatypeProperty ;
473
+ rdfs:domain :PhysicalEntity ;
474
+ rdfs:range xsd:integer .
475
+
476
+ :hoursSinceLastOverhaul a owl:DatatypeProperty ;
477
+ rdfs:domain :PhysicalEntity ;
478
+ rdfs:range xsd:decimal .
479
+
480
+ # --- Sensor Measurements ---
481
+ :readingTimestamp a owl:DatatypeProperty, owl:FunctionalProperty ;
482
+ rdfs:domain :SensorReading ;
483
+ rdfs:range xsd:dateTime .
484
+
485
+ :readingValue a owl:DatatypeProperty, owl:FunctionalProperty ;
486
+ rdfs:domain :SensorReading ;
487
+ rdfs:range xsd:decimal .
488
+
489
+ :readingUnit a owl:DatatypeProperty ;
490
+ rdfs:domain :SensorReading ;
491
+ rdfs:range xsd:string .
492
+
493
+ # --- Thresholds & Limits ---
494
+ :nominalMin a owl:DatatypeProperty ;
495
+ rdfs:domain :Sensor ;
496
+ rdfs:range xsd:decimal ;
497
+ rdfs:comment "Lower bound of the normal operating range." .
498
+
499
+ :nominalMax a owl:DatatypeProperty ;
500
+ rdfs:domain :Sensor ;
501
+ rdfs:range xsd:decimal ;
502
+ rdfs:comment "Upper bound of the normal operating range." .
503
+
504
+ :cautionThreshold a owl:DatatypeProperty ;
505
+ rdfs:domain :Sensor ;
506
+ rdfs:range xsd:decimal .
507
+
508
+ :warningThreshold a owl:DatatypeProperty ;
509
+ rdfs:domain :Sensor ;
510
+ rdfs:range xsd:decimal .
511
+
512
+ :criticalThreshold a owl:DatatypeProperty ;
513
+ rdfs:domain :Sensor ;
514
+ rdfs:range xsd:decimal .
515
+
516
+ # --- Wear & RUL ---
517
+ :wearIndex a owl:DatatypeProperty ;
518
+ rdfs:domain :PhysicalEntity ;
519
+ rdfs:range xsd:decimal ;
520
+ rdfs:comment "Normalized 0.0 (new) to 1.0 (end of life) wear metric." .
521
+
522
+ :remainingUsefulLifeCycles a owl:DatatypeProperty ;
523
+ rdfs:domain :PhysicalEntity ;
524
+ rdfs:range xsd:integer ;
525
+ rdfs:comment "Estimated remaining flight cycles before required action." .
526
+
527
+ :remainingUsefulLifeHours a owl:DatatypeProperty ;
528
+ rdfs:domain :PhysicalEntity ;
529
+ rdfs:range xsd:decimal .
530
+
531
+ :meanTimeBetweenFailures a owl:DatatypeProperty ;
532
+ rdfs:domain :Component ;
533
+ rdfs:range xsd:decimal ;
534
+ rdfs:comment "MTBF in flight hours." .
535
+
536
+ # --- Maintenance ---
537
+ :maintenanceCost a owl:DatatypeProperty ;
538
+ rdfs:domain :MaintenanceAction ;
539
+ rdfs:range xsd:decimal .
540
+
541
+ :maintenanceDate a owl:DatatypeProperty ;
542
+ rdfs:domain :MaintenanceAction ;
543
+ rdfs:range xsd:date .
544
+
545
+ :maintenanceDowntimeHours a owl:DatatypeProperty ;
546
+ rdfs:domain :MaintenanceAction ;
547
+ rdfs:range xsd:decimal .
548
+
549
+ :finding a owl:DatatypeProperty ;
550
+ rdfs:label "finding" ;
551
+ rdfs:comment "What an inspection found: within_limits or beyond_limits. A repair or overhaul has none." ;
552
+ rdfs:domain :MaintenanceAction ;
553
+ rdfs:range xsd:string .
554
+
555
+ :scheduledInterval a owl:DatatypeProperty ;
556
+ rdfs:domain :Component ;
557
+ rdfs:range xsd:integer ;
558
+ rdfs:comment "Manufacturer-recommended interval in cycles." .
559
+
560
+ # =============================================================================
561
+ # OWL Property Chains: Inferred Relationships
562
+ # =============================================================================
563
+
564
+ # If sensor S monitors component C, and C isPartOf module M,
565
+ # then S indirectly monitors M.
566
+ # Expressed as: monitors o isPartOf -> monitors
567
+ :monitors owl:propertyChainAxiom ( :monitors :isPartOf ) .
568
+
569
+ # If component A propagatesTo B, and B isPartOf module M,
570
+ # then degradation in A affects module M.
571
+ :affectsModule a owl:ObjectProperty ;
572
+ rdfs:label "affects module" ;
573
+ owl:propertyChainAxiom ( :propagatesTo :isPartOf ) .
574
+
575
+ # =============================================================================
576
+ # OWL Defined Classes (for classification reasoning)
577
+ # =============================================================================
578
+
579
+ :HighWearComponent a owl:Class ;
580
+ rdfs:subClassOf :Component ;
581
+ rdfs:label "High Wear Component" ;
582
+ rdfs:comment """A Component with wearIndex >= 0.7. Membership comes from the mapping (the components whose
583
+ wear index is 0.7 or more), not from an axiom: a datatype restriction is outside OWL 2 RL and QL.""" .
584
+
585
+ :CriticalPathComponent a owl:Class ;
586
+ rdfs:subClassOf :Component ;
587
+ rdfs:label "Critical Path Component" ;
588
+ rdfs:comment """A Component whose failure propagates to 2+ other components. Membership comes from the
589
+ mapping (a query grouping propagatesTo by its subject), not from an axiom: a min cardinality is outside
590
+ OWL 2 RL and QL.""" .
591
+
592
+ :MonitoredComponent a owl:Class ;
593
+ rdfs:label "Monitored Component" ;
594
+ rdfs:comment "Any component observed by at least one sensor." .
595
+
596
+ # A component a sensor monitors is a MonitoredComponent: OWL 2 RL applies this (cls-int1, cls-svf1). The
597
+ # converse, that every MonitoredComponent is monitored, an existential on the superclass side, is outside it.
598
+ [ a owl:Class ;
599
+ owl:intersectionOf (
600
+ :Component
601
+ [ a owl:Restriction ;
602
+ owl:onProperty [ owl:inverseOf :monitors ] ;
603
+ owl:someValuesFrom :Sensor
604
+ ]
605
+ )
606
+ ] rdfs:subClassOf :MonitoredComponent .
@@ -0,0 +1,33 @@
1
+ @prefix : <http://example.org/engine-maintenance#> .
2
+ @prefix pay: <http://example.org/engine-maintenance/payload#> .
3
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
+ @prefix sh: <http://www.w3.org/ns/shacl#> .
5
+
6
+ # What one engine record holds, for prograph.extras.instance_graph (docs/demos/turbofan-instance-graph.md).
7
+ # These shapes describe a payload; they are not the validation shapes (shapes.ttl). A property shape with
8
+ # sh:node embeds its values with that node shape; one without keeps them as IRIs or literals.
9
+
10
+ pay:EnginePayloadShape a sh:NodeShape ;
11
+ sh:targetClass :Engine ;
12
+ rdfs:comment "An engine with its parts, each part's parts, and the sensors installed on any of them. The aircraft is a reference; readings are not in the record."@en ;
13
+ sh:property [ sh:path rdfs:label ] ,
14
+ [ sh:path :serialNumber ] ,
15
+ [ sh:path :totalCyclesSinceNew ] ,
16
+ [ sh:path :wearIndex ] ,
17
+ [ sh:path :installedOnAircraft ] ,
18
+ [ sh:path [ sh:inversePath :isPartOf ] ; sh:node pay:PartPayloadShape ] ,
19
+ [ sh:path [ sh:inversePath :installedOn ] ; sh:node pay:SensorPayloadShape ] .
20
+
21
+ pay:PartPayloadShape a sh:NodeShape ;
22
+ rdfs:comment "A module or component: its condition, its own parts, and its sensors."@en ;
23
+ sh:property [ sh:path rdfs:label ] ,
24
+ [ sh:path :wearIndex ] ,
25
+ [ sh:path :cyclesSinceLastOverhaul ] ,
26
+ [ sh:path [ sh:inversePath :isPartOf ] ; sh:node pay:PartPayloadShape ] ,
27
+ [ sh:path [ sh:inversePath :installedOn ] ; sh:node pay:SensorPayloadShape ] .
28
+
29
+ pay:SensorPayloadShape a sh:NodeShape ;
30
+ rdfs:comment "A sensor: what it is and what it monitors. Its readings (:hasReading) are left out."@en ;
31
+ sh:property [ sh:path rdfs:label ] ,
32
+ [ sh:path :sensorId ] ,
33
+ [ sh:path :monitors ] .