ASPL Programming ver 1.00
© 2024 Bassem W. Jamaleddine


10-1

   Shallow Matching in Set Operations

Shallow matching is a match between two strings based on some intermediate function that takes as input both strings and return true or false based on the function internals. ASPL provides shallow matching through an internal module, and offer the user to edit and make changes to the functions of the module. The shallow module functions are selectable, the ASPL command shallowed displays the current shallow function being used by ASPL, and the command ~shallowed edits the shallowed modiule.

ASPL offers ten operators to do shallow set operations: f*&, f*U,f*\, f*D,

d*&, d*U,d*\,

g*&, g*U, and g*\.

■ The shallowed Command

At the ASPL prompt when you type the command shallowed the following is displayed at your terminal:

  THE SHALLOW MATCHING IDENTIFIER TO SELECT THE ROUTINE WHEN SHALLOW SETOPS ARE USED:

                  IDENTIFIER  DESCRIPTION                                                         
                  ----------  -----------                                                         
                     nothing  matching nothing at all                                             
                    starstar  matching anything and everything                                    
               matchandmatch  matching the ./subgroups and the element                            
                matchormatch  matching the ./subgroups or the element                             
                        elem  matching just the element and ignoring ./subgroups                  
                        stem  matching just the ./subgroups and ignoring the element              
             endjoinedeither  matching from end of ./subgroups/element for either                 
             begjoinedeither  matching the beginning of ./subgroups/element for either            
                     endstem  matching just the ./subgroups from the end and ignoring the element 
               endstemeither  matching just the ./subgroups from the end and ignoring the element (for either)
                     begstem  matching from beginning of ./subgroups while ignoring the element   
               begstemeither  matching from beginning of ./subgroups while ignoring the element (for either)
                  piecedstem  matching at least one piece in ./subgroups while ignoring the element
   >          piecedstemelem  matching the element and at least one piece in the ./subgroups      
                     begelem  matching from the beginning of element and ignoring ./subgroups (for either)
                     endelem  matching from the end of element and ignoring ./subgroups (for either)
                     rgxelem  matching the element anywhere and ignoring ./subgroups (for either) 
                    prcrelem  apply processor when matching the element anywhere and ignoring ./subgroups (for either)

   CURRENTLY LOADED piecedstemelem


  WHEN SELECTING prcrelem AS THE SHALLOW MATCHING IDENTIFIER, ONE OF THE FOLLOWING
  NODE PROCESSOR IDENTIFIER CAN BE SELECTED:

                  IDENTIFIER EVAL  DESCRIPTION                                                         
                  ---------- ----  -----------                                                         
   >                    asis    1  neutral without any change                                          
                      ja2cla    1  substitute .java with .class                                        
                     transac    1  capture the element where word Transaction occured, ignore case     
                      cla2ja    1  substitute .class with .java                                        
                          uc    1  upper case                                                          
                          lc    1  lower case                                                          

   CURRENTLY LOADED PROCESSOR asis

THE shallowedMatches PACKAGE CAN BE EDITED TO ADD MORE MATCHING SUBROUTINES.
SEE ASPL CONFIGURATION FILES FOR MORE ABOUT EDITING shallowedMatches PACKAGE.

       some yellow note about this display
viewme

 -E- Display. 10.1.1   [SHALLOWED cOMMAND IN ASPL][Shallowed Command in ASPL]
a footnote here

 

Example 10.1.1

Shallow Set Operation on JMX Jar Archives - Element Regex

The following example shows shallow set operations performed on the sample JMXJAR workspace.

In this example we will get the shallow intersection on the elements (that is the file names) matching anywhere from the end.

       display or terminal for Example: Shallow Set Operation on JMX Jar Archives - Element Regex
viewme

 -E- Display. 10.1.2   [Shallow Set Operation on JMX Jar Archives - Element Regex][Shallow Set Operation on JMX Jar Archives - Element Regex]
Shallow Set Operation on JMX Jar Archives - Element Regex

 

Example 10.1.2

Shallow Set Operation on Java Jar Archive - Elements with Transaction

The following example shows shallow set operations performed on the sample JMXJAR workspace.

In this example we will get the shallow intersection on the elements where the word transaction occurs.

       display or terminal for Example: Shallow Set Operation on Java Jar Archive - Elements with Transaction
viewme

 -E- Display. 10.1.3   [Shallow Set Operation on Java Jar Archive - Elements with Transaction][Shallow Set Operation on Java Jar Archive - Elements with Transaction]
Shallow Set Operation on Java Jar Archive - Elements with Transaction

 

Example 10.1.3

Shallow Set Symmetric Difference on Java Jar Archive - Elements with Transaction

The following example shows shallow set operations performed on the sample JMXJAR workspace.

In this example we will get the shallow symmetric difference on the elements where the word transaction occurs.

       display or terminal for Example: Shallow Set Symmetric Difference on Java Jar Archive - Elements with Transaction
viewme

 -E- Display. 10.1.4   [Shallow Set Symmetric Difference on Java Jar Archive - Elements with Transaction][Shallow Set Symmetric Difference on Java Jar Archive - Elements with Transaction]
Shallow Set Symmetric Difference on Java Jar Archive - Elements with Transaction