expressir 2.1.29 → 2.1.31
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.
- checksums.yaml +4 -4
- data/.github/workflows/docs.yml +98 -0
- data/.github/workflows/links.yml +100 -0
- data/.github/workflows/rake.yml +4 -0
- data/.github/workflows/release.yml +5 -0
- data/.github/workflows/validate_schemas.yml +1 -1
- data/.gitignore +3 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +209 -55
- data/Gemfile +2 -1
- data/README.adoc +650 -83
- data/docs/Gemfile +12 -0
- data/docs/_config.yml +141 -0
- data/docs/_guides/changes/changes-format.adoc +778 -0
- data/docs/_guides/changes/importing-eengine.adoc +898 -0
- data/docs/_guides/changes/index.adoc +396 -0
- data/docs/_guides/changes/programmatic-usage.adoc +1038 -0
- data/docs/_guides/changes/validating-changes.adoc +681 -0
- data/docs/_guides/cli/benchmark-performance.adoc +834 -0
- data/docs/_guides/cli/coverage-analysis.adoc +921 -0
- data/docs/_guides/cli/format-schemas.adoc +547 -0
- data/docs/_guides/cli/index.adoc +8 -0
- data/docs/_guides/cli/managing-changes.adoc +927 -0
- data/docs/_guides/cli/validate-ascii.adoc +645 -0
- data/docs/_guides/cli/validate-schemas.adoc +534 -0
- data/docs/_guides/index.adoc +165 -0
- data/docs/_guides/ler/creating-packages.adoc +664 -0
- data/docs/_guides/ler/index.adoc +305 -0
- data/docs/_guides/ler/loading-packages.adoc +707 -0
- data/docs/_guides/ler/package-formats.adoc +748 -0
- data/docs/_guides/ler/querying-packages.adoc +826 -0
- data/docs/_guides/ler/validating-packages.adoc +750 -0
- data/docs/_guides/liquid/basic-templates.adoc +813 -0
- data/docs/_guides/liquid/documentation-generation.adoc +1042 -0
- data/docs/_guides/liquid/drops-reference.adoc +829 -0
- data/docs/_guides/liquid/filters-and-tags.adoc +912 -0
- data/docs/_guides/liquid/index.adoc +468 -0
- data/docs/_guides/manifests/creating-manifests.adoc +483 -0
- data/docs/_guides/manifests/index.adoc +307 -0
- data/docs/_guides/manifests/resolving-manifests.adoc +557 -0
- data/docs/_guides/manifests/validating-manifests.adoc +713 -0
- data/docs/_guides/ruby-api/formatting-schemas.adoc +605 -0
- data/docs/_guides/ruby-api/index.adoc +257 -0
- data/docs/_guides/ruby-api/parsing-files.adoc +421 -0
- data/docs/_guides/ruby-api/search-engine.adoc +609 -0
- data/docs/_guides/ruby-api/working-with-repository.adoc +577 -0
- data/docs/_pages/data-model.adoc +665 -0
- data/docs/_pages/express-language.adoc +506 -0
- data/docs/_pages/getting-started.adoc +414 -0
- data/docs/_pages/index.adoc +116 -0
- data/docs/_pages/introduction.adoc +256 -0
- data/docs/_pages/ler-packages.adoc +837 -0
- data/docs/_pages/parsers.adoc +683 -0
- data/docs/_pages/schema-manifests.adoc +431 -0
- data/docs/_references/index.adoc +228 -0
- data/docs/_tutorials/creating-ler-package.adoc +735 -0
- data/docs/_tutorials/documentation-coverage.adoc +795 -0
- data/docs/_tutorials/index.adoc +221 -0
- data/docs/_tutorials/liquid-templates.adoc +806 -0
- data/docs/_tutorials/parsing-your-first-schema.adoc +522 -0
- data/docs/_tutorials/querying-schemas.adoc +751 -0
- data/docs/_tutorials/working-with-multiple-schemas.adoc +676 -0
- data/docs/index.adoc +242 -0
- data/docs/lychee.toml +84 -0
- data/examples/demo_ler_usage.sh +86 -0
- data/examples/ler/README.md +111 -0
- data/examples/ler/simple_example.ler +0 -0
- data/examples/ler/simple_schema.exp +33 -0
- data/examples/ler_build.rb +75 -0
- data/examples/ler_cli.rb +79 -0
- data/examples/ler_demo_complete.rb +276 -0
- data/examples/ler_query.rb +91 -0
- data/examples/ler_query_examples.rb +305 -0
- data/examples/ler_stats.rb +81 -0
- data/examples/phase3_demo.rb +159 -0
- data/examples/query_demo_simple.rb +131 -0
- data/expressir.gemspec +2 -0
- data/lib/expressir/changes/schema_change.rb +32 -22
- data/lib/expressir/changes/{edition_change.rb → version_change.rb} +3 -3
- data/lib/expressir/cli.rb +12 -4
- data/lib/expressir/commands/changes_import_eengine.rb +2 -2
- data/lib/expressir/commands/changes_validate.rb +1 -1
- data/lib/expressir/commands/manifest.rb +427 -0
- data/lib/expressir/commands/package.rb +1274 -0
- data/lib/expressir/commands/validate.rb +70 -37
- data/lib/expressir/commands/validate_ascii.rb +607 -0
- data/lib/expressir/commands/validate_load.rb +88 -0
- data/lib/expressir/express/formatter.rb +5 -1
- data/lib/expressir/express/formatters/remark_item_formatter.rb +25 -0
- data/lib/expressir/express/parser.rb +33 -0
- data/lib/expressir/manifest/resolver.rb +213 -0
- data/lib/expressir/manifest/validator.rb +195 -0
- data/lib/expressir/model/declarations/entity.rb +6 -0
- data/lib/expressir/model/dependency_resolver.rb +270 -0
- data/lib/expressir/model/indexes/entity_index.rb +103 -0
- data/lib/expressir/model/indexes/reference_index.rb +148 -0
- data/lib/expressir/model/indexes/type_index.rb +149 -0
- data/lib/expressir/model/interface_validator.rb +384 -0
- data/lib/expressir/model/repository.rb +400 -5
- data/lib/expressir/model/repository_validator.rb +295 -0
- data/lib/expressir/model/search_engine.rb +525 -0
- data/lib/expressir/model.rb +4 -94
- data/lib/expressir/package/builder.rb +200 -0
- data/lib/expressir/package/metadata.rb +81 -0
- data/lib/expressir/package/reader.rb +165 -0
- data/lib/expressir/schema_manifest.rb +11 -1
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +16 -3
- metadata +115 -5
- data/docs/benchmarking.adoc +0 -107
- data/docs/liquid_drops.adoc +0 -1547
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Introduction
|
|
3
|
+
nav_order: 2
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
== Introduction to Expressir
|
|
7
|
+
|
|
8
|
+
=== Purpose
|
|
9
|
+
|
|
10
|
+
This page introduces Expressir, explaining what it is, its key capabilities, and when to use it. You'll understand the architecture and design of Expressir and how it fits into the EXPRESS ecosystem.
|
|
11
|
+
|
|
12
|
+
=== References
|
|
13
|
+
|
|
14
|
+
* link:express-language.html[EXPRESS Language] - Understanding EXPRESS
|
|
15
|
+
* link:parsers.html[Parsers] - How parsing works
|
|
16
|
+
* link:data-model.html[Data Model] - Ruby representation of EXPRESS
|
|
17
|
+
* link:../tutorials/parsing-your-first-schema.html[Tutorial: Parsing Your First Schema]
|
|
18
|
+
|
|
19
|
+
=== Concepts
|
|
20
|
+
|
|
21
|
+
EXPRESS:: A data modeling language defined by ISO 10303-11, used for formal specification of product data in industrial automation and integration
|
|
22
|
+
Schema:: A named collection of EXPRESS declarations (entities, types, functions, etc.) that defines a data model
|
|
23
|
+
Repository:: Expressir's container for one or more parsed EXPRESS schemas
|
|
24
|
+
Parser:: Component that reads EXPRESS text and converts it to Expressir's Ruby data model
|
|
25
|
+
LER:: LutaML EXPRESS Repository - a high-performance binary package format for distributing pre-parsed schemas
|
|
26
|
+
|
|
27
|
+
=== What is Expressir?
|
|
28
|
+
|
|
29
|
+
Expressir ("`EXPRESS in Ruby`") is a Ruby parser for EXPRESS and a comprehensive set of Ruby tools for accessing ISO EXPRESS data models.
|
|
30
|
+
|
|
31
|
+
EXPRESS is the data modeling language defined in ISO 10303-11:2007, widely used in product data representation and exchange, particularly in the STEP (Standard for the Exchange of Product model data) standard family.
|
|
32
|
+
|
|
33
|
+
Expressir provides Ruby developers with the ability to:
|
|
34
|
+
|
|
35
|
+
* Parse EXPRESS schemas from multiple formats
|
|
36
|
+
* Manipulate EXPRESS data models programmatically
|
|
37
|
+
* Convert between different representations
|
|
38
|
+
* Generate documentation and derived artifacts
|
|
39
|
+
* Analyze schema quality and coverage
|
|
40
|
+
|
|
41
|
+
=== Key Capabilities
|
|
42
|
+
|
|
43
|
+
Expressir consists of three main parts:
|
|
44
|
+
|
|
45
|
+
==== Parsers
|
|
46
|
+
|
|
47
|
+
Expressir includes parsers for multiple EXPRESS formats:
|
|
48
|
+
|
|
49
|
+
EXPRESS data modelling language (ISO 10303-11:2007):: The standard EXPRESS language syntax used in most ISO 10303 application protocols
|
|
50
|
+
|
|
51
|
+
STEPmod EXPRESS XML:: EXPRESS data modelling language in XML format used in the STEPmod modular STEP schema repository
|
|
52
|
+
|
|
53
|
+
EXPRESS XML (ISO 10303-28:2007):: The XML representation of EXPRESS schemas defined in ISO 10303-28 "Industrial automation systems and integration — Product data representation and exchange — Part 28: Implementation methods: XML representations of EXPRESS schemas and data, using XML schemas"
|
|
54
|
+
|
|
55
|
+
All parsers produce the same unified Ruby data model, allowing you to work with schemas from different sources consistently.
|
|
56
|
+
|
|
57
|
+
==== Data Model
|
|
58
|
+
|
|
59
|
+
The data model (`lib/expressir/model`) is Expressir's Ruby representation that fully captures an EXPRESS schema's structure and semantics.
|
|
60
|
+
|
|
61
|
+
Key characteristics:
|
|
62
|
+
|
|
63
|
+
* **Complete representation**: Every EXPRESS construct has a corresponding Ruby class
|
|
64
|
+
* **Type-safe**: Strong typing ensures model integrity
|
|
65
|
+
* **Navigable**: Easy traversal of schema relationships
|
|
66
|
+
* **Serializable**: Can be converted to various output formats
|
|
67
|
+
|
|
68
|
+
The model uses an object-oriented design with clear separation between:
|
|
69
|
+
|
|
70
|
+
* Declarations (entities, types, functions, procedures, rules)
|
|
71
|
+
* Data types (primitives, aggregates, constructed types)
|
|
72
|
+
* Expressions and statements
|
|
73
|
+
* References and relationships
|
|
74
|
+
|
|
75
|
+
See link:data-model.html[Data Model] for detailed information.
|
|
76
|
+
|
|
77
|
+
==== Converters
|
|
78
|
+
|
|
79
|
+
Converters transform the EXPRESS Ruby data model into interoperable export formats:
|
|
80
|
+
|
|
81
|
+
* **EXPRESS language output**: Pretty-print schemas in standard EXPRESS syntax
|
|
82
|
+
* **Documentation formats**: Generate human-readable documentation
|
|
83
|
+
* **Analysis formats**: Export for quality analysis and validation
|
|
84
|
+
|
|
85
|
+
Future converters planned:
|
|
86
|
+
|
|
87
|
+
* W3C OWL (Web Ontology Language)
|
|
88
|
+
* OMG SysML (Systems Modeling Language)
|
|
89
|
+
* OMG UML 2
|
|
90
|
+
|
|
91
|
+
=== When to Use Expressir
|
|
92
|
+
|
|
93
|
+
Expressir is ideal when you need to:
|
|
94
|
+
|
|
95
|
+
**Parse and analyze EXPRESS schemas**::
|
|
96
|
+
Read schemas from ISO standards, validate their structure, or analyze their content
|
|
97
|
+
|
|
98
|
+
**Generate documentation**::
|
|
99
|
+
Create HTML, PDF, or other formats from EXPRESS schemas with custom templates
|
|
100
|
+
|
|
101
|
+
**Transform schemas**::
|
|
102
|
+
Convert between EXPRESS and other modeling languages or formats
|
|
103
|
+
|
|
104
|
+
**Validate schema quality**::
|
|
105
|
+
Check documentation coverage, naming conventions, or structural patterns
|
|
106
|
+
|
|
107
|
+
**Build tools for EXPRESS**::
|
|
108
|
+
Create editors, validators, or other tools that work with EXPRESS data models
|
|
109
|
+
|
|
110
|
+
**Integrate with Ruby applications**::
|
|
111
|
+
Incorporate EXPRESS schema processing into Ruby/Rails applications
|
|
112
|
+
|
|
113
|
+
**Distribute schemas efficiently**::
|
|
114
|
+
Package schemas as LER files for fast loading and distribution
|
|
115
|
+
|
|
116
|
+
=== When NOT to Use Expressir
|
|
117
|
+
|
|
118
|
+
Consider alternatives when:
|
|
119
|
+
|
|
120
|
+
**You only need basic text manipulation**::
|
|
121
|
+
Simple grep or sed operations might suffice for basic tasks
|
|
122
|
+
|
|
123
|
+
**You need runtime instance data processing**::
|
|
124
|
+
Expressir focuses on schema-level operations; for STEP instance file parsing (Part 21), consider dedicated STEP readers
|
|
125
|
+
|
|
126
|
+
**Performance is critical for real-time systems**::
|
|
127
|
+
While Expressir is performant, compiled C/C++ parsers may be faster for extremely large schemas processed repeatedly
|
|
128
|
+
|
|
129
|
+
**You need visual schema editing**::
|
|
130
|
+
Expressir is programmatic; for visual modeling, consider EXPRESS-G tools
|
|
131
|
+
|
|
132
|
+
=== Comparison with Other Tools
|
|
133
|
+
|
|
134
|
+
==== vs Manual Parsing
|
|
135
|
+
|
|
136
|
+
Manual regex or text parsing of EXPRESS:
|
|
137
|
+
|
|
138
|
+
* ❌ Error-prone and incomplete
|
|
139
|
+
* ❌ Difficult to maintain
|
|
140
|
+
* ❌ Misses language subtleties
|
|
141
|
+
* ❌ No semantic understanding
|
|
142
|
+
|
|
143
|
+
Expressir:
|
|
144
|
+
|
|
145
|
+
* ✅ Complete, validated parsing
|
|
146
|
+
* ✅ Semantic model with relationships
|
|
147
|
+
* ✅ Professional quality
|
|
148
|
+
* ✅ Maintained and tested
|
|
149
|
+
|
|
150
|
+
==== vs Other EXPRESS Tools
|
|
151
|
+
|
|
152
|
+
Traditional EXPRESS tools (written in Lisp, C++, etc.):
|
|
153
|
+
|
|
154
|
+
* Often hard to integrate with modern applications
|
|
155
|
+
* May have licensing restrictions
|
|
156
|
+
* Limited documentation generation
|
|
157
|
+
|
|
158
|
+
Expressir:
|
|
159
|
+
|
|
160
|
+
* Native Ruby integration
|
|
161
|
+
* Open source (BSD 2-clause)
|
|
162
|
+
* Flexible template-based output
|
|
163
|
+
* Modern, maintainable codebase
|
|
164
|
+
|
|
165
|
+
==== vs Other Modeling Languages
|
|
166
|
+
|
|
167
|
+
**EXPRESS vs JSON Schema**::
|
|
168
|
+
EXPRESS provides formal semantics, inheritance, constraints, and algorithms. JSON Schema is simpler but less expressive.
|
|
169
|
+
|
|
170
|
+
**EXPRESS vs UML**::
|
|
171
|
+
EXPRESS has formal semantics and is textual. UML is more visual but less precise for data modeling.
|
|
172
|
+
|
|
173
|
+
**EXPRESS vs XSD**::
|
|
174
|
+
EXPRESS has richer type system and built-in algorithms. XSD is XML-specific.
|
|
175
|
+
|
|
176
|
+
=== Architecture
|
|
177
|
+
|
|
178
|
+
Expressir follows a pipeline architecture:
|
|
179
|
+
|
|
180
|
+
[source]
|
|
181
|
+
----
|
|
182
|
+
┌─────────────────┐
|
|
183
|
+
│ EXPRESS Files │ (source formats)
|
|
184
|
+
│ - .exp files │
|
|
185
|
+
│ - STEPmod XML │
|
|
186
|
+
│ - EXPRESS XML │
|
|
187
|
+
└────────┬────────┘
|
|
188
|
+
│
|
|
189
|
+
▼
|
|
190
|
+
┌──────────┐
|
|
191
|
+
│ Parsers │ (format-specific)
|
|
192
|
+
└────┬─────┘
|
|
193
|
+
│
|
|
194
|
+
▼
|
|
195
|
+
┌───────────────────┐
|
|
196
|
+
│ Data Model │ (unified representation)
|
|
197
|
+
│ Repository │
|
|
198
|
+
│ └─ Schema │
|
|
199
|
+
│ └─ Entity │
|
|
200
|
+
│ └─ Type │
|
|
201
|
+
│ └─ Function │
|
|
202
|
+
│ └─ ... │
|
|
203
|
+
└─────────┬─────────┘
|
|
204
|
+
│
|
|
205
|
+
┌───┴───┬────────┬────────────┐
|
|
206
|
+
▼ ▼ ▼ ▼
|
|
207
|
+
┌─────────┐ ┌──────┐ ┌──────┐ ┌─────────┐
|
|
208
|
+
│Formatter│ │Liquid│ │ LER │ │Analysis │
|
|
209
|
+
│ │ │Drops │ │Export│ │ Tools │
|
|
210
|
+
└─────────┘ └──────┘ └──────┘ └─────────┘
|
|
211
|
+
│ │ │ │
|
|
212
|
+
▼ ▼ ▼ ▼
|
|
213
|
+
EXPRESS HTML/PDF .ler Coverage
|
|
214
|
+
Output Docs Files Reports
|
|
215
|
+
----
|
|
216
|
+
|
|
217
|
+
Key architectural principles:
|
|
218
|
+
|
|
219
|
+
**Separation of concerns**:: Parsing, modeling, and output are distinct layers
|
|
220
|
+
|
|
221
|
+
**Format independence**:: All parsers produce the same data model
|
|
222
|
+
|
|
223
|
+
**Extensibility**:: New parsers and converters can be added without affecting the core
|
|
224
|
+
|
|
225
|
+
**Performance**:: Caching and LER packages optimize for production use
|
|
226
|
+
|
|
227
|
+
=== Architecture Benefits
|
|
228
|
+
|
|
229
|
+
**Unified model**::
|
|
230
|
+
Work with schemas from any format using the same API
|
|
231
|
+
|
|
232
|
+
**Type safety**::
|
|
233
|
+
Ruby classes ensure correctness and enable IDE support
|
|
234
|
+
|
|
235
|
+
**Testability**::
|
|
236
|
+
Clean separation enables comprehensive test coverage
|
|
237
|
+
|
|
238
|
+
**Maintainability**::
|
|
239
|
+
Clear responsibilities and well-defined interfaces
|
|
240
|
+
|
|
241
|
+
**Performance**::
|
|
242
|
+
Smart caching and binary packages for production efficiency
|
|
243
|
+
|
|
244
|
+
=== Getting Started
|
|
245
|
+
|
|
246
|
+
Ready to try Expressir? Continue to:
|
|
247
|
+
|
|
248
|
+
* link:getting-started.html[Getting Started] - Install and try Expressir
|
|
249
|
+
* link:../tutorials/parsing-your-first-schema.html[Tutorial: Parsing Your First Schema] - Hands-on tutorial
|
|
250
|
+
|
|
251
|
+
=== Bibliography
|
|
252
|
+
|
|
253
|
+
* https://www.iso.org/standard/38047.html[ISO 10303-11:2004] - Industrial automation systems and integration — Product data representation and exchange — Part 11: Description methods: The EXPRESS language reference manual
|
|
254
|
+
* https://www.expresslang.org/[EXPRESS Language Foundation (ELF)] - Official EXPRESS resources and specifications
|
|
255
|
+
* https://en.wikipedia.org/wiki/EXPRESS_(data_modeling_language)[EXPRESS on Wikipedia] - Overview and history
|
|
256
|
+
* https://www.nist.gov/services-resources/software/step-file-analyzers-and-viewers[NIST STEP Tools] - Related EXPRESS tools and resources
|