Skip to content

Commit

Permalink
requirement DERIVED-PREDICATES is parsed now
Browse files Browse the repository at this point in the history
  • Loading branch information
ertsiger committed Jun 7, 2018
1 parent 8a43c05 commit a7e0aab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser/Domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Domain {
bool temp, nondet, neg, disj; // whether domain is temporal, is non-deterministic, has negative precons, has disjunctive preconditions
bool universal; // whether domain has universal precons
bool fluents; // whether domains contains fluents
bool derivedpred; // whether domain contains derived predicates

TokenStruct< Type * > types; // types
TokenStruct< Lifted * > preds; // predicates
Expand All @@ -45,7 +46,7 @@ class Domain {
: equality( false ), strips( false ), adl( false ), condeffects( false )
, typed( false ), cons( false ), costs( false ), temp( false )
, nondet( false ), neg( false ), disj( false ), universal( false )
, fluents( false )
, fluents( false ), derivedpred( false )
{
types.insert( new Type( "OBJECT" ) ); // Type 0 is always "OBJECT", whether the domain is typed or not
}
Expand Down Expand Up @@ -135,6 +136,7 @@ class Domain {
else if ( s == "UNIVERSAL-PRECONDITIONS" ) universal = true;
else if ( s == "FLUENTS" ) fluents = true;
else if ( s == "DISJUNCTIVE-PRECONDITIONS" ) disj = true;
else if ( s == "DERIVED-PREDICATES" ) derivedpred = true;
else return false; // Unknown requirement

return true;
Expand Down Expand Up @@ -563,6 +565,7 @@ class Domain {
if ( universal ) os << " :UNIVERSAL-PRECONDITIONS";
if ( fluents ) os << " :FLUENTS";
if ( disj ) os << " :DISJUNCTIVE-PRECONDITIONS";
if ( derivedpred ) os << " :DERIVED-PREDICATES";
os << " )\n";
return os;
}
Expand Down

0 comments on commit a7e0aab

Please sign in to comment.