Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Put TREAT modded ap242 into a separate directory
  • Loading branch information
starseeker committed Feb 9, 2026
commit 4d03347df68b8de40fa2aacdf53faa062b7b5c19
File renamed without changes.
28 changes: 4 additions & 24 deletions data/ap242/README.md → data/ap242treat/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
# AP242 Schema Files
# AP242 TREAT Schema File

This directory contains two versions of the AP242 (ISO 10303-242) schema.
This directory contains an altered version of the AP242 (ISO 10303-242) schema.

## Files

### `242_mim_lf.exp` (Original)
- **Status**: Original ISO schema with non-standard parsing requirement
- **Size**: 54,756 lines
- **Parsing**: Requires STEPcode's flow-sensitive type narrowing extension
- **Standards**: Contains pattern that needs implicit type narrowing (non-standard)

### `242_mim_lf_treat.exp` (Standards-Compliant)
- **Status**: Corrected version using TREAT expression
- **Size**: 54,756 lines
- **Parsing**: Fully ISO 10303-11 compliant
- **Standards**: Uses explicit TREAT expression for type narrowing
It is corrected to avoid the non-standard parsing requirement of the original
by using explicit TREAT expression for type narrowing

## The Difference

Expand All @@ -30,8 +19,6 @@ QUERY(it <* item | ...)
QUERY(it <* TREAT(item AS set_representation_item) | ...)
```

## Why Two Versions?

### Historical Context
The original AP242 schema contains a WHERE rule that:
1. Checks if `item` (a SELECT type) is a `SET_REPRESENTATION_ITEM`
Expand Down Expand Up @@ -68,13 +55,6 @@ Expected output:

For detailed comparison, see `doc/ap242-comparison.md`.

## Which Version to Use?

- **For STEPcode**: Both work equally well
- **For portability**: Use the TREAT version (`242_mim_lf_treat.exp`)
- **For ISO compliance**: Use the TREAT version (`242_mim_lf_treat.exp`)
- **For historical reference**: The original is preserved as `242_mim_lf.exp`

## Related Documentation

- `doc/ap242-comparison.md` - Detailed comparison and analysis
Expand Down
4 changes: 2 additions & 2 deletions test/compare_ap242_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ fi
# Test TREAT version (standards-compliant)
echo ""
echo -e "${BLUE}Testing TREAT-based AP242 schema (standards-compliant)...${NC}"
echo " Input: data/ap242/242_mim_lf_treat.exp"
echo " Input: data/ap242treat/242_mim_lf_treat.exp"
echo " Output: $TREAT_OUTPUT"

if "$BUILD_DIR/bin/exp2cxx" "$REPO_ROOT/data/ap242/242_mim_lf_treat.exp" "$TREAT_OUTPUT" > "$TREAT_OUTPUT/exp2cxx.log" 2>&1; then
if "$BUILD_DIR/bin/exp2cxx" "$REPO_ROOT/data/ap242treat/242_mim_lf_treat.exp" "$TREAT_OUTPUT" > "$TREAT_OUTPUT/exp2cxx.log" 2>&1; then
echo -e "${GREEN}✓ TREAT version parsed successfully${NC}"
else
echo -e "${RED}✗ TREAT version failed to parse${NC}"
Expand Down