Skip to content

Commit

Permalink
M agpl-htn-plan-utils.adb
Browse files Browse the repository at this point in the history
M    agpl-cr-mutable_assignment.adb
M    agpl-htn-plan.adb
M    agpl-htn-plan.ads
  • Loading branch information
mosteo committed Sep 25, 2006
1 parent f0d4609 commit 838ddaa
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion agpl-cr-mutable_assignment.adb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ with Ada.Numerics.Generic_Elementary_Functions;

package body Agpl.Cr.Mutable_Assignment is

Expensive_Checks : constant Boolean := True;
Expensive_Checks : constant Boolean := False;

File : constant String := "[Mutable_Assignment] ";

Expand Down
7 changes: 5 additions & 2 deletions agpl-htn-plan-utils.adb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ package body Agpl.Htn.Plan.Utils is
Parent : Subplan;
Reindex_Needed : Boolean := False;
begin
pragma Assert (Get_Kind (Node) = Task_Node);
loop
if Node /= null then
pragma Assert (Get_Kind (Node) = Task_Node);
null;
end if;
while Node /= null loop
if Get_Kind (Node) = Or_Node then
Parent := Get_Parent (Node);
-- Replace the OR node by the branch we were arriving from.
Expand Down
6 changes: 5 additions & 1 deletion agpl-htn-plan.adb
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ package body Agpl.Htn.Plan is
is
use Plan_Node.Task_Id_To_Node;
begin
return Element (Find (This.Index, Id));
if This.Index.Contains (Id) then
return This.Index.Element (Id);
else
return null;
end if;
end Get_Node;

--------------
Expand Down
1 change: 1 addition & 0 deletions agpl-htn-plan.ads
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ package Agpl.Htn.Plan is
(This : in Object;
Id : in Tasks.Task_Id) return Subplan;
-- Get the branch starting at the given task.
-- May be null if the task isn't in the tree

function Get_Root (This : in Object) return Subplan;
-- Get the root node.
Expand Down

0 comments on commit 838ddaa

Please sign in to comment.