Getting Error "DXL maximum instruction count reached (infinite loop?)"

Hello All,

This is my piece of code, while running this i am getting error. It throws output to some extend after that it is showing "HALT Execution"

 

pragma encoding, "UTF-8"
Object o
Link lnk

string obj_typ, obj_id, Spec_status

// Outlinks can be iterated, since the source is already loaded
for o in entire current Module do
{
  bodyText = identifier(o)
  Obj_txt = o."Object Text"
  VC_text = o."Verification Criteria"
  
  for lnk in all o ->"*" do
  {
    // load target
    ModuleVersion mvTarget = targetVersion lnk
    Module modTarget = data mvTarget
    noError();
    if (null modTarget) modTarget = load(mvTarget,false)
    lastError();
    delete mvTarget

   // if (null modTarget) { /* put error handling here! */; continue }  

    // get target object
    Object oTgt = target lnk
    obj_typ = oTgt."Object Type"
    Spec_status = oTgt."Spec Status"
    //print "spec_staus : " Spec_status "\n"
    
    //obj_id = identifier (oTgt)
    if (null oTgt) { /* put error handling here! */; continue }

    if (isDeleted oTgt) { /* error handling here! */; continue }  
    
    if (obj_typ == "Deleted Requirement") then 
        print "Out1: \n ' For current source object : " (identifier(o))" to target object :"(identifier (oTgt)) " \n object type = " obj_typ "\n"
      
    if (Spec_status == "Obsolete") then
        print "Out2: \n ' For current source object : " (identifier(o))" to target object :"(identifier (oTgt)) " \n Spec Status is "Spec_status"\n"
    
    obj_typ = ""
    Spec_status = ""    
  }
  }

 

The Error is  : "-R-I- DXL: <Line:0> DXL maximum instruction count reached (infinite loop?).  Extend limit with pragma runLim,<count>."

 

How to resolve such errors 

PS: for small DOOR module it is running fine.


UmangVarshney - Mon Jan 16 01:26:37 EST 2017

Re: Getting Error "DXL maximum instruction count reached (infinite loop?)"
Mike.Scharnow - Mon Jan 16 02:13:44 EST 2017

just do what the error message tells you. Add a line 

pragma runLim, <count>

to your code. For <count>, you can either experiment or you disable the check by using 0 for <count>

Re: Getting Error "DXL maximum instruction count reached (infinite loop?)"
UmangVarshney - Mon Jan 16 02:41:21 EST 2017

Mike.Scharnow - Mon Jan 16 02:13:44 EST 2017

just do what the error message tells you. Add a line 

pragma runLim, <count>

to your code. For <count>, you can either experiment or you disable the check by using 0 for <count>

if i am using pragma runLim, <count>, it is showing syntax error.

And if i am using  pragma runLim,"count", then following error is coming

 

-E- DXL: <Line:3> pragma (perm) expects an int argument
-I- DXL: All done. Errors reported: 1. Warnings reported: 0.

 

Please help.

Re: Getting Error "DXL maximum instruction count reached (infinite loop?)"
Bob_Swan - Mon Jan 16 03:57:16 EST 2017

UmangVarshney - Mon Jan 16 02:41:21 EST 2017

if i am using pragma runLim, <count>, it is showing syntax error.

And if i am using  pragma runLim,"count", then following error is coming

 

-E- DXL: <Line:3> pragma (perm) expects an int argument
-I- DXL: All done. Errors reported: 1. Warnings reported: 0.

 

Please help.

The <count> part is an integer indicating how long  to run the code.

0 will run without stopping (unless there is a program exit),

any other integer will cause the program to stop after that period.

Refer to the dxl manual for fuller guidance.

Re: Getting Error "DXL maximum instruction count reached (infinite loop?)"
UmangVarshney - Mon Jan 16 06:07:12 EST 2017

Bob_Swan - Mon Jan 16 03:57:16 EST 2017

The <count> part is an integer indicating how long  to run the code.

0 will run without stopping (unless there is a program exit),

any other integer will cause the program to stop after that period.

Refer to the dxl manual for fuller guidance.

Thank you so much Smile