Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
language:langs:refine [2025/04/21 19:58] – [Refinement overrides] rajitlanguage:langs:refine [2025/07/21 19:47] (current) – [Multiple refinement options] rajit
Line 111: Line 111:
 </code> </code>
  
-In this case, "-ref=2" will //replace// the first refine block with the second. In other words, instance ''i1'' will not +In this case, the ''refine<2> { ... }'' block behaves as ''refine { refine { ... } }''. In other words, when ''-ref=2'' is specified, 
-be created, and ''-ref=2'' will select instance ''j2'' and the ''prs { ... }'' body. +instance ''i1'' as well as ''j1'' will be created. Furthermore, the refinement option will eliminate the ''chp { ... }'' block from the first level refinement, as this has now been replaced with the second level refinement.
- +
-In general, a refine block has an associated integer refinement level (the default is one). When ACT processes a block with refinement level //r//, it searches for the largest refinement block with level that is at most //r//. (Note: this may be no blockin which case the block is processed as normal.) If a refine block with level //l// is found, then it processes all non-language constructs within the block and then expands the refinement block with level //l// by decrementing the current refinement level by //l//.+
  
 ===== Refinement overrides ===== ===== Refinement overrides =====
Line 123: Line 121:
  
 <code act> <code act>
-refine<2>   +refine<2>  +{ e1of2 l; } {
-  +{ e1of2 l; } +
-    +
        inst1 i1;         inst1 i1; 
        ...        ...
-    } + }
-}+
 </code> </code>
  
 This will apply the refinement override for ''l'' when this particular refinement body is selected. This will apply the refinement override for ''l'' when this particular refinement body is selected.
-   
-    
- 
-</code> 
- 
-