ASPL User Guide v 1.00
© 2025 Bassem W. Jamaleddine


11. 1
   ASPL Shallow Set Operations

 

The following are the shallow set operators

f*&   f*U   f*\   f*D   d*&   d*U   d*\   g*&   g*U   g*\

Shallow element intersection

      f*&   a1 a2 [a3 .. aN]       where a1 a2 [a3 .. aN] are set variables

Shallow element union

      f*U   a1 a2

Shallow element difference

      f*\   a1 a2

Shallow element set symmetric

      f*D   a1 a2

Shallow subgroup intersection

      d*&   a1 a2

Shallow subgroup union

      d*U   a1 a2

Shallow subgroup difference

      d*\   a1 a2

Shallow group intersection

      g*&   a1 a2

Shallow group union

      g*U   a1 a2

Shallow group difference

      g*\   a1 a2

ASPL Shallow Set Operations

●  ASPL Shallow Set Operations

Shallow matching is a match between two strings performed through some intermediate function that takes as input both strings, then returns true or false. 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 module.

ASPL provides 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 on 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                  
        elemnocase  matching just the element (no case) 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                                                         
        ---------- ----  -----------                                                         
           transac    1  capture the element where word Transaction occured, ignore case     
            cla2ja    1  substitute .class with .java                                        
            ja2cla    1  substitute .java with .class                                        
                uc    1  upper case                                                          
                lc    1  lower case                                                          
         >    asis    1  neutral without any change                                          

   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.

viewme

 -TC- Display. 11.1.1   [Shallowed Command in ASPL]
Shallowed Command in ASPL

If you select the prcrelem as the processor, then you can also select one of the node processors:

aspl> shallowed prcrelem

aspl> setprcr cla2ja

aspl> shallowed

It is possible to specify your own processor inline; first setshallowed to prcrelem, then type prcr followed by your inline node processor.

Here is an example showing how to replace elements where .class appears with .java:

aspl> shallowed prcrelem

aspl> prcr sub { my $s = shift; $s =~ s/\.class/\.java/; return $s; }

 

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.

viewme

 -TC- Display. 11.1.2   [Shallow Set Operation on JMX Jar Archives - Element Regex]
Shallow Set Operation on JMX Jar Archives - Element Regex

 

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.

viewme

 -TC- Display. 11.1.3   [Shallow Set Operation on Java Jar Archive - Elements with Transaction]
Shallow Set Operation on Java Jar Archive - Elements with Transaction

 

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.

viewme

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