# Presentation: 000999

## NASA - STEP for Aerospace Workshop

**Rules Driven Software for STEP**

**January 18, 2001**
**NASA - Jet Propulsions Laboratories**
**Pasadena, CA.**

**Gregory L. Smith**
**Boeing Space & Communications Group**
**253-773-5947**
**Gregory.L.Smith@Boeing.com**

- 1/18/01

## Agenda

- Rules Discussion
- COTS Rules Environment -
- Benefits / Architecture / Challenges
- Generic Rules Environment -
- Benefits / Architecture / Challenges
- Introduction of STEP data
- System Demonstration

- 1/18/01

## Rules Discussion

- What is the greatest challenge facing conventional software development?

- 1/18/01

## Rules Discussion

- Artificial Intelligence
- Robotics
- Machine Learning
- Voice Recognition
- Semantic Understanding
- Neural Networks
- Knowledge Representation
- Experts Systems/ Rules Based Systems
- others

- 1/18/01

**Notes:**
Consists of various technologies and fields 

## Rules Discussion

- What problems are rules based systems best at solving?
- Configuration
- Analysis
- Design for X
- Producibility
- Manufacturability
- Data Verification
- Diagnostics
- Knowledge discovery

- 1/18/01

**Notes:**
EX systems being used for Income tax form analysis, font analysis (Adode)

EX tool vendors have been selling knowledge empty systems are 20 years
Most vendors are out of business or transitioning to other businesses

## COTS Rules Environment - Benefits

- Why should one consider a rules based systems approach?
- Functionality is localized
- Data validation & verification is localized
- Introducing additional functionality has minimum effect on existing functionality
- Information can be discovered / acted on
- Complexity can be managed
- System can be easily extended

- 1/18/01

**Notes:**
Problems with Conventional Software Applications 

Computer Aided Design report, December 2000
Why are bugs winning?

Bugs creeping up in sections of code where nothing new had been added! 

Ault lies in the method by which software are created
	bad pointers
	failure to free memory
	bad data

## COTS Rules Environment - Architecture

**Rules Execution**
**Environment**
**-----**
**Rules**
**Selection Mechanism**
**Rule Agenda**
**Inference Mechanism**
**Rule Strategies**
**Initiation Mechanism**
**Trace Facility**
**Report Facility**

**Rules Definition**
**Environment**
**-----**
**Rules**
**Editing Facility**
**Syntax Checking**

- 1/18/01

**Notes:**
Rule Definition facilities 
Rules
If - Then code routines
Supporting attributes
Rule Execution facilities
Rules
Selection Mechanism
which rules should executed (initially)
Rule Agenda
as rules are executed, they execute other rules by placing them on the agenda
Inference Mechanism
pattern matching algorithm that runs rules on the agenda
Rule strategies
Best first, depth first, depth first 
Initiation mechanism
Kicking the rules off
Trace facility
which rules have been rule
Report facility
output results to user.

## COTS Rules Environment - Challenges

- Multiple operating environments
- Numerous rule representations
- Specific syntax and semantics
- Rule ‘experts’ can not cross vendor tools
- Multiple disparate rule strategies
- Inability to migrate rules between COTS rule environments
- Environments are DATA INTENSIVE!

- 1/18/01

## Generic Rules Environment - Benefits

- Rules can be written in a ‘generic’ language
- Rules can be ‘migrated’ to:
- Multiple vendors
- Multiple platforms
- Multiple rule environments
- Multiple rule execution facilities
- Rules can be stored in a computer interpretable representation (STEP).

- 1/18/01

## Generic Rules Environment - Architecture

**Rules Execution**
**Environment**
**-----**
**Rules**
**Selection Mechanism**
**Rule Agenda**
**Inference Mechanism**
**Rule Strategies**
**Initiation Mechanism**
**Trace Facility**
**Report Facility**

**Generic**
**Rules Definition**
**Environment**
**-----**
**Rules**
**Editing Facility**
**Syntax Checking**
**Rule Conversion**

- 1/18/01

## Generic Rules Environment - Architecture

- Rules attributes

- 1/18/01

## Generic Rules Environment - Challenges

- Each COTS Environment has:
- Its own subset and/or superset of code functions
- Logic, math, list, string, set, I/O, etc.
- Its own rule control strategies
- Backward chaining
- Forward chaining
- Exhaustive back tracking
- Assertive/ Non-Assertive execution
- Goal-based/ Non-Goal-based execution

- 1/18/01

**Notes:**
Longevity of vendors and their tools
Functions are different between vendors and tools
Control strategies different between vendors and tools

## Generic Rules Environment - Introduction of STEP data

**CAD Applications**

**Vendor CAD Tools**

**Gerber**

**EDIF**

**ODB++**

**GenCAM**

**IDF**

**Vendor Neutral**
**Files**

**IGES**

**DXF**

**STEP**

**Vendor**
**APIs**

**GenCAD**

**SDAI**

**PDM**

**GDSII**

**User / Programmer **
**Aggravation Level!**

- 1/18/01

## Rules Architecture - Data

**Vendor**
**ECAD Data**

- 1/18/01

## Rules Architecture - Data

**Components_class attributes:**
- active_passive		current_maximum
- current_typical		extents
- height			junction_max_temp
- location			no_comp
- package_class		package_id
- package_object		package_type
- part_number		part_symbol
- planned_characteristics		power_maximum
- power_minimum		power_typical
- raw_location		reference_designator
- rotation			spice_parameter
- surface			thermal_junction
- value

**PWA_class attributes:**
- description
- mother_board
- name
- number_of_components
- number_of_packages
- other_components
- revision
- revision_description
- version
- version_description

**PWB_class attributes:**
- board_type
- connector_on_primary
- connector_on_secondary
- diagonal_placement_allowed
- diagonal_routing_allowed
- drill_origin
- ground_plane_layer
- layer_names
- layer_numbers
- length
- max_x
- max_y
- milling_origin
- min_x
- min_y
- number_of_layers
- orthogonal_placement_only
- placement_outline
- power_plane_layer
- preferred_orientation
- side_components_permitted
- side_names
- width

**Types_class attributes:**
- axials
- chips
- classes
- dips
- gp_smds
- radials
- sips
- types

**Manufacturing_class attributes:**
- any_bottom_smd
- any_smd
- any_top_smd
- axials
- bottom_smd
- chips
- dips
- gp_smds
- ict_auto
- manual
- radials
- sips
- smd_auto
- th_auto
- top_smd
- wave_solder

**Packages_class attributes:**
- allowable_surface
- diagonal
- extents
- id
- layout_type
- no_via_keepout
- not_in_bom
- orthogonal
- outline_overhang
- package_class
- package_type
- pin_count
- pin_locations
- polarized
- required_rotation
- thermal_outline

- 1/18/01

## Rules Definition Facility - Rule Meta Data

- 1/18/01

## Rules Definition Facility - Code Definition

**PWB_class attributes:**
- board_type
- connector_on_primary
- connector_on_secondary
- diagonal_placement_allowed
- diagonal_routing_allowed
- drill_origin
- ground_plane_layer
- layer_names
- layer_numbers
- length
- max_x
- max_y
- milling_origin
- min_x
- min_y
- number_of_layers
- orthogonal_placement_only
- placement_outline
- power_plane_layer
- preferred_orientation
- side_components_permitted
- side_names
- width

- 1/18/01

## Rules Execution Facility

- 1/18/01

## Questions?

- 1/18/01

## Generic Rule Format

- /********** Start of Rule **********/
- Rule:
- Rule1
- Author:
- G.L.Smith
- Conclusion:
- SimpleConclusion3
- SimpleConclusion4
- SimpleConclusion2
- SimpleConclusion3:
- PutFacts
- Analysis_fact
- violation_text
- `( "  This PWA is greater than the maximum PWB size for a PWA destined for Automated
- Through Hole Insertion." )
- SimpleConclusion4:
- PutFacts
- Analysis_fact
- violation_text
- SimpleConclusion5
- SimpleConclusion5:
- AppendLists
- SimpleConclusion6
- ?msg
- SimpleConclusion6:
- GetFacts
- Analysis_fact
- violation_text
- SimpleConclusion2:
- ChainOn
- Analysis_fact
- violation
- Generate
- RULE_SET

- Key rule attributes are delimited by
- a colon (:)

- Comment

- 1/18/01

## Generic Rule Format

- Date:
- 10/21/1997
- Description:
- If the PWB meets the following dimension criteria it supports Through Hole Insertion.
- Criteria:  PWB maximum must not exceed 18.0" W x 18.0" L
- Justification:
- RULE: The maximum PWB size for a PWA destined for automated
- assembly is:
-           Automated Through Hole Insertion          18.0" W X 18.0" L
-           Surface Mount Processing                  12.0" W X 18.0" L
-           Wave Solder Processing                    16.0" W X 20.0" L
- RATIONALE: These are the largest PWBs that can be used in the
- automated processing equipment due to equipment limitations.
- MajorVersion:
- 238
- MinorVersion:
- 38
- ModificationDate:
- 04/14/1999
- ModificationTime:
- 07:57:35 AM
- Name:
- Check Maximum PWB Dimensions for Through Hole equipment
- Notes:
- Not Defined
- Organization:
- Manufacturing

- 1/18/01

## Generic Rule Format

- Premise:
- ComplexPremise1
- ComplexPremise2
- ComplexPremise3
- ComplexPremise4
- ComplexPremise1:
- SimplePremise3
- SimplePremise6
- SimplePremise30
- SimplePremise1
- SimplePremise14
- SimplePremise5
- SimplePremise8
- SimplePremise21
- SimplePremise9
- SimplePremise3:
- Equal
- Succeeded
- Status_fact.data_capture
- SimplePremise6:
- Equal
- Mfg_fact.th_auto
- True
- SimplePremise30:
- AppendFacts
- Analysis_fact
- execution_list
- `( 30209, "3.2.9", ?rule, "Rule" )
- SimplePremise1:
- DefineVariable
- ?width
- SimplePremise2

- SimplePremise2:
- GetFact
- PWB_fact
- width
- SimplePremise14:
- DefineVariable
- ?length
- SimplePremise15
- SimplePremise15:
- GetFact
- PWB_fact
- length
- SimplePremise5:
- DefineVariable
- ?max_width
- 18.0
- SimplePremise8:
- DefineVariable
- ?max_length
- 18.0
- SimplePremise21:
- DefineVariable
- ?msg
- `( )
- SimplePremise9:
- Not
- True
- ComplexPremise2:
- SimplePremise16
- SimplePremise4
- SimplePremise22
- SimplePremise10

- 1/18/01

## Generic Rule Format

- SimplePremise16:
- Equal
- Mfg_fact.th_auto
- True
- SimplePremise4:
- GreaterThan
- ?width
- ?max_width
- SimplePremise22:
- DefineVariable
- ?msg
- SimplePremise23
- SimplePremise23:
- AppendToList
- ?msg
- SimplePremise24
- SimplePremise24:
- AppendStrings
- "  The PWB width ("
- ?width
- ") is greater than the allowable maximum
-    size ("
- ?max_width
- ")."
- SimplePremise10:
- Not
- True
- ComplexPremise3:
- SimplePremise12
- SimplePremise7
- SimplePremise25
- SimplePremise11

- SimplePremise12:
- Equal
- Mfg_fact.th_auto
- True
- SimplePremise7:
- GreaterThan
- ?length
- ?max_length
- SimplePremise25:
- DefineVariable
- ?msg
- SimplePremise26
- SimplePremise26:
- AppendToList
- ?msg
- SimplePremise27
- SimplePremise27:
- AppendStrings
- "  The PWB length ("
- ?length
- ") is greater than the allowable maximum
-    size ("
- ?max_length
- ")."
- SimplePremise11:
- Not
- True
- ComplexPremise4:
- SimplePremise29
- SimplePremise17
- SimplePremise29:
- Equal
- Mfg_fact.th_auto
- True

- 1/18/01

## Generic Rule Format

- SimplePremise17:
- GreaterThan
- SimplePremise28
- 0
- SimplePremise28:
- ListLength
- ?msg
- Priority:
- -10
- Sets:
- 3.2.9 PWB Dimensioning (set108)
- Source:
- Irving Producibility Guidelines, 201-1000-002, Rev E
- Status:
- Approved
- Supersedes:
- Not Defined
- Time:
- 08:22:39 AM
- /***** End of Rule *****/

- 1/18/01