Guards crash- Europa 2.6

8 views
Skip to first unread message

Emilio Remolina

unread,
Feb 29, 2012, 1:21:59 PM2/29/12
to europa-users
All,
I'm getting a run time exception for the following 'dummy'
definition using a guard: (complete test case below)

Dummy::testGuards {
int i=[0,1];
if (i==0) {
this.start <= 1;
}
if (i==1) {
2==2;
}
}

The error says:
.\Solvers\base\Solver.cc:230: Error: !m_exhausted ||
m_decisionStack.empty() is false
Cannot be left in an exhausted state if there are still decisions to
evaluate.
psengine.PSException: Cannot be left in an exhausted state if there
are still decisions to evaluate.
at psengine.PSEngineInterfaceJNI.PSSolver_isExhausted(Native Method)
at psengine.PSSolver.isExhausted(Unknown Source)
at org.ops.ui.solver.swing.PSSolverDialog.stepSolver(Unknown Source)


If I replace the definition to use a boolean instead of i=[0,1] then
things work (see below).
Are there are any limitations when using multiple guards via something
like
int i=[0,10];
if (i==0) {} ... if (i==10){}.


Thanks,

-Emilio

---------------------------------------------
Here is the testing code;


#include "Resources.nddl"

class Dummy extends Timeline {
Dummy() {
super();
}

predicate testGuards{};
}


Dummy::testGuards {
int i=[0,1];
if (i==0) {
this.start <= 1;
}
if (i==1) {
2==2;
}
}


/*
Dummy::testGuards {
bool b;
if (b==true) {
this.start <=1;
}
if (b==false) {
2==2;
}
}
*/

//problem
Dummy aDummy = new Dummy();
goal(aDummy.testGuards _g);
eq(_g.start, 10);
Reply all
Reply to author
Forward
0 new messages