rpgoldman / europa-pso

Automatically exported from code.google.com/p/europa-pso
0 stars 0 forks source link

Incorrect NDDL causes silent errors #96

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use makeproject to create a example problem.
2. Change the predicate definition to be:
{{{
YourObject::helloWorld{
 eq(duration, 10);

 int oops;
 this.oops == 1;
// meets (object.helloWorld);
// met_by(object.helloWorld);
}
}}}

3.  Try running the problem.

When I run from the Eclipse UI, or from the command line (using 'make'), I see 
no errors reported, even though 'this.oops' shouldn't have the 'this' there.  
Things seem to be dying silently behind the scenes, since no plan is created.

This kind of error is very difficult to track down without some indication of 
the source of the issue.

(I ran into other examples of the same thing, but there's a general solution 
for them all).

Original issue reported on code.google.com by tristanb...@gmail.com on 8 Feb 2011 at 6:51

GoogleCodeExporter commented 8 years ago
Two more examples I just came across:

 1.  Change the class name itself, but leave everything else referencing the old class. 

 2.  Similarly, leave the class name, but change one of the references to it.  For example, change "YourObject::helloWorld" to "YourObjectX::helloWorld".

Original comment by tristanb...@gmail.com on 3 Mar 2011 at 11:31

GoogleCodeExporter commented 8 years ago
Two more examples I just came across:

 1.  Change the class name itself, but leave everything else referencing the old class. 

 2.  Similarly, leave the class name, but change one of the references to it.  For example, change "YourObject::helloWorld" to "YourObjectX::helloWorld".

Original comment by tristanb...@gmail.com on 3 Mar 2011 at 11:39

GoogleCodeExporter commented 8 years ago

Original comment by tristanb...@gmail.com on 13 Apr 2011 at 10:55

GoogleCodeExporter commented 8 years ago

Original comment by javier.barreiro@gmail.com on 17 Aug 2011 at 7:42

GoogleCodeExporter commented 8 years ago
Another example of silent errors:

The model of the attached files has a mistake, the line  
    eq(p.to, successor.position); 

compares p.to to a token that has not been declared yet. The easy way to fix 
this issue is moving previous command after   
       meets( effect object.currentLocation successor);

Insted of giving an error message, you just get an empty plandatabase.

Rover::Go{

  met_by( condition object.currentLocation predecessor);
  neq( predecessor.position, to );

  met_by( condition object.instrument.state_.setStowState predState);
  predState.value  == unstowed;

  // The path used must be between the 2 points
  eq(p.from, predecessor.position);
  eq(p.to, successor.position);

  meets( effect object.currentLocation successor);
  eq(successor.position, to); // prevents rover from going from a location straight back to that location.

  // Pull power from the battery equal to the path cost.
  starts( effect Battery.consume tx);
  eq(tx.quantity, p.cost);

}

Original comment by nirl...@gmail.com on 1 Sep 2011 at 8:16

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by javier.barreiro@gmail.com on 30 May 2012 at 5:26

GoogleCodeExporter commented 8 years ago
It turns out that the project template Main.cc file didn't actually catch any 
NDDL errors of any sort.  That's been fixed, so NDDL errors should prevent 
further execution.  NDDL problems in PSUI are reported to the console, which 
isn't ideal, but at least they aren't hidden.  

I know everybody who's commented on this ticket has limited time to verify 
things (or even remember what was going on), so I'm going to leave this as 
"Started" for a couple of weeks for comments and then close it as fixed and 
open another, lower-priority ticket about better error reporting in PSUI.

Original comment by miata...@gmail.com on 7 Aug 2014 at 9:57

GoogleCodeExporter commented 8 years ago
I forgot to mention:  the change I committed was r6740.

Original comment by miata...@gmail.com on 7 Aug 2014 at 9:59

GoogleCodeExporter commented 8 years ago
PSUI ticket is issue 164.

Original comment by miata...@gmail.com on 20 Sep 2014 at 8:09