Skip to content

Commit

Permalink
M agpl-streams-file.ads
Browse files Browse the repository at this point in the history
M    agpl-streams-memory_arrays_constrained.ads
M    agpl-stochastics-mdp.ads
M    agpl-cr-assigner-hungry2.ads
M    agpl-htn-tasks-compound.ads
M    agpl-xml.ads
M    agpl-if_function.ads
M    agpl-stochastics-mdp-solver-naive3.adb
M    agpl-streams-filter-bandwidth_throttle.ads
M    agpl-htn-method-vectors.ads
M    agpl-stochastics-mdp-solver-backwards.adb
M    agpl-cr-controller_observer.ads
M    agpl-gdk/agpl-gdk-modal_drawing_area.ads
M    agpl-gdk/agpl-gdk-managed.ads
M    agpl-gdk/agpl-gdk-palette.ads
M    agpl-gdk/agpl-gdk-utils.ads
M    agpl-gdk/agpl-gdk-pango_layout.ads
M    agpl-stochastics-mdp-solver-naive3.ads
M    agpl-cr-gap-vector.ads
M    agpl-stochastics-mdp-solver-backwards.ads
M    agpl-cr-assigner.ads
M    agpl-simple_dictionary.ads
M    agpl-segmented_thing.adb
M    agpl-streams-filter-buffered_unbounded.ads
M    agpl-strings-fields.ads
M    agpl-cr-gap-safe_array_handle.ads
M    agpl-graph-timed.ads
M    agpl-htn-method-lists.ads
M    agpl-segmented_thing.ads
M    agpl-optimization-annealing.ads
M    agpl-cr-tasks-insertions.ads
M    agpl-stochastics-mdp-state.ads
M    agpl-delayer.ads
M    agpl-cr-agent-dummy.ads
M    mw/permutations.ads
M    mw/exchange.ads
M    agpl-aux-indexer_string_integer.ads
M    agpl-graph.ads
M    agpl-htn-tasks-handle.ads
M    agpl-htn-method.ads
M    agpl-cr-assigner-hungry3.ads
M    agpl-stochastics-mdp-solver-common.adb
M    agpl-monitor.ads
M    agpl-stochastics-mdp-solver-naive.adb
M    agpl-stochastics-mdp-solver-common.ads
M    agpl-cr-assigner-lists.ads
M    agpl-stochastics-mdp-solver.ads
M    agpl-stochastics-mdp-solver-naive.ads
M    agpl-protected_values-ustrings.ads
M    agpl-optimization-annealing-solver.ads
M    agpl-protected_values-duration.ads
M    agpl-smart_access_limited.adb
M    agpl-htn-tasks-vectors.ads
M    agpl-stochastics-mdp-value_function.adb
M    agpl-htn-tasks-lists_utils.adb
M    agpl-cr-assignment.ads
M    agpl-stochastics-mdp-outcome.ads
M    agpl-smart_access_limited.ads
M    agpl-htn-tasks-primitive.ads
M    agpl-stochastics-mdp-value_function.ads
M    agpl-cr-gap-vector-map.ads
M    agpl-cr-plan_assigner-greedy1.ads
D    agpl-cr-traderbot.ads
M    agpl-htn-tasks-lists_utils.ads
A    agpl-htn-plan_node-get_random_sibling.adb
M    agpl-endian.ads
M    agpl-cr-agent-maps.ads
M    agpl-ip.ads
A    agpl-htn-plan_node-get_random_sibling.ads
M    agpl-safe_file.ads
D    agpl-http.ads
M    agpl-cr-agent-handle.ads
M    agpl-cr-cost_matrix.ads
M    agpl-htn-plan_node.adb
M    agpl-cr-tasks-starting_pose.ads
M    agpl-htn-plan-lists.ads
M    agpl-cr-agent.adb
M    agpl-geoip.adb
M    agpl-cr-gap-safe_array.ads
M    agpl-graphs-bellman_ford.adb
M    agpl-htn-plan_node.ads
M    agpl-optimization-mtsp.adb
M    agpl-protected_values-integers.ads
M    agpl-htn-plan-utils.adb
M    agpl-cr-agent.ads
M    agpl-geoip.ads
M    agpl-graphs-bellman_ford.ads
M    agpl-optimization-mtsp.ads
M    agpl-stochastics-mdp-containers.ads
M    agpl-calendar.ads
M    agpl-htn-plan-utils.ads
M    agpl-cr-mutable_assignment.adb
M    agpl-streams-observable_filter.ads
M    agpl-htn-tasks-maps.ads
M    agpl-chronos.ads
A    agpl-htn-plan-utils-random.adb
M    agpl-cr-mutable_assignment.ads
M    agpl-bag.ads
A    agpl-htn-plan-utils-random.ads
M    agpl-streams-filter.ads
M    agpl-htn-tasks-immediate.ads
M    agpl-bmp-draw.ads
M    agpl-bmp.ads
A    obsolete/agpl-cr-traderbot.ads
M    agpl-stochastics-mdp-problem.ads
M    agpl-stochastics-mdp-solver-naive2.adb
M    agpl-cr-plan_assigner.ads
M    agpl-conversions-io.adb
M    agpl-calendar-format.ads
M    agpl-stochastics-mdp-solver-naive2.ads
M    agpl-htn-plan.adb
M    agpl-context_controllers.ads
M    agpl-conversions-io.ads
M    agpl-streams-circular.ads
M    agpl-stochastics-mdp-action.ads
M    agpl-htn-plan.ads
M    agpl-cr-controller_observer-lists.ads
M    agpl-cr-gap.adb
M    agpl-cr-agent_task_key.ads
M    agpl-stochastics-mdp-bellman.adb
M    agpl-cr-agent-lists.ads
M    agpl-aux.ads
M    agpl-streams-memory_arrays.ads
M    agpl-smart_access.ads
M    agpl-cr-gap.ads
M    agpl-stochastics-mdp-bellman.ads
M    agpl-random.ads
M    agpl-cr-agent-vectors.ads
  • Loading branch information
mosteo committed Jun 28, 2006
1 parent ba07935 commit bae81cc
Show file tree
Hide file tree
Showing 126 changed files with 653 additions and 565 deletions.
4 changes: 3 additions & 1 deletion agpl-aux-indexer_string_integer.ads
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@
with Ada.Containers.Indefinite_Ordered_Maps;

package Agpl.Aux.Indexer_String_Integer is new
Ada.Containers.Indefinite_Ordered_Maps (String, Integer, "<", "=");
Ada.Containers.Indefinite_Ordered_Maps (String, Integer, "<", "=");

pragma Preelaborate (Agpl.Aux.Indexer_String_Integer);

2 changes: 2 additions & 0 deletions agpl-aux.ads
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@

package Agpl.Aux is

pragma Pure;

end Agpl.Aux;
2 changes: 1 addition & 1 deletion agpl-bag.ads
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ generic
Grow_factor : Float := 1.5;
package Agpl.Bag is

pragma Elaborate_Body;
pragma Preelaborate;

package Bag_Vectors is new Agpl.Dynamic_Vector (Item_Type,
Initial_Size,
Expand Down
2 changes: 2 additions & 0 deletions agpl-bmp-draw.ads
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ with Agpl.Types.Constants;

package Agpl.Bmp.Draw is

pragma Preelaborate;

------------------------------------------------------------------------
-- Delete --
------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions agpl-bmp.ads
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ with Ada.Streams;

package Agpl.Bmp is

pragma Preelaborate;

-- Mime_type
Mime_type : constant String := "image/bmp";

Expand Down
2 changes: 2 additions & 0 deletions agpl-calendar-format.ads
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ with Ada.Calendar;

package Agpl.Calendar.Format is

pragma Elaborate_Body;

-- Returns a beautified duration in hours, minutes, seconds, ms
function Image (D : in Duration) return String;

Expand Down
2 changes: 2 additions & 0 deletions agpl-calendar.ads
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@

package Agpl.Calendar is

pragma Pure;

end Agpl.Calendar;
2 changes: 2 additions & 0 deletions agpl-chronos.ads
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ with Ada.Calendar;

package Agpl.Chronos is

pragma Elaborate_Body;

type Object is tagged private;
type Object_Access is access Object'Class;

Expand Down
2 changes: 2 additions & 0 deletions agpl-context_controllers.ads
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ with Ada.Finalization;

package Agpl.Context_controllers is

pragma Preelaborate;

------------------------------------------------------------------------
-- Object --
------------------------------------------------------------------------
Expand Down
17 changes: 4 additions & 13 deletions agpl-conversions-io.adb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
------------------------------------------------------------------------------
-- $Id: agpl.ads,v 1.4 2004/01/21 21:05:25 Jano Exp $

with Ada.Text_IO;
with System.Img_Real; use System.Img_Real;

package body Agpl.Conversions.Io is

Expand All @@ -42,36 +42,27 @@ package body Agpl.Conversions.Io is


function To_String (N : Float; Decimals : Natural := 2) return String is
package f_io is new Ada.Text_IO.Float_IO (Float);
S : String (1 .. 100);
begin
if Decimals > 0 then
f_io.Put (S, N, Aft => Decimals, Exp => 0);
return Trim (S);
return To_String (Long_Long_Float (N), Decimals);
else
return To_String (Integer (N));
end if;
end To_string;

function To_String (N : Long_Long_Float; Decimals : Natural := 2) return String is
package f_io is new Ada.Text_IO.Float_IO (Long_Long_Float);
S : String (1 .. 100);
begin
if Decimals > 0 then
f_io.Put (S, N, Aft => Decimals, Exp => 0);
return Trim (S);
return Trim (Image_Ordinary_Fixed_Point (N, Decimals));
else
return To_String (Integer (N));
end if;
end To_string;

function To_Str (N : Real; Decimals : Natural := 2) return String is
package F_Io is new Ada.Text_Io.Float_Io (Real);
S : String (1 .. 100);
begin
if Decimals > 0 then
f_io.Put (S, N, Aft => Decimals, Exp => 0);
return Trim (S);
return To_String (Long_Long_Float (N), Decimals);
else
return To_String (Integer (N));
end if;
Expand Down
14 changes: 10 additions & 4 deletions agpl-conversions-io.ads
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,24 @@

package Agpl.Conversions.Io is

pragma Elaborate_Body;
pragma Preelaborate;

------------------------------------------------------------------------
-- To_string --
------------------------------------------------------------------------
-- Works as 'Img but removes leading/trailing spaces
-- Performs rounding on floats
function To_string (N : Float; Decimals : Natural := 2) return String;
function To_string (N : Long_Long_Float; Decimals : Natural := 2) return String;
function To_string (N : Float;
Decimals : Natural := 2)
return String;
function To_string (N : Long_Long_Float;
Decimals : Natural := 2)
return String;

generic
type Real is digits <>;
function To_Str (N : Real; Decimals : Natural := 2) return String;
function To_Str (N : Real;
Decimals : Natural := 2)
return String;

end Agpl.Conversions.Io;
2 changes: 1 addition & 1 deletion agpl-cr-agent-dummy.ads
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

package Agpl.Cr.Agent.Dummy is

pragma Elaborate_Body;
pragma Preelaborate;

type Object is new Agent.Object with private;

Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-agent-handle.ads
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
with Agpl.Generic_Handle;

package Agpl.Cr.Agent.Handle is new Agpl.Generic_Handle (Agent.Object'Class);

pragma Preelaborate (Agpl.Cr.Agent.Handle);
2 changes: 2 additions & 0 deletions agpl-cr-agent-lists.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ with Ada.Containers.Indefinite_Doubly_Linked_Lists;

package Agpl.Cr.Agent.Lists is new
Ada.Containers.Indefinite_Doubly_Linked_Lists (Object'Class);

pragma Preelaborate (Agpl.Cr.Agent.Lists);
2 changes: 2 additions & 0 deletions agpl-cr-agent-maps.ads
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ with Ada.Strings.Hash;
package Agpl.Cr.Agent.Maps is new
Ada.Containers.Indefinite_Hashed_Maps
(String, Object'Class, Ada.Strings.Hash, "=");

pragma Preelaborate (Agpl.Cr.Agent.Maps);
2 changes: 2 additions & 0 deletions agpl-cr-agent-vectors.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ with Ada.Containers.Indefinite_Vectors;

package Agpl.Cr.Agent.Vectors is new
Ada.Containers.Indefinite_Vectors (Positive, Object'Class);

pragma Preelaborate (Agpl.Cr.Agent.Vectors);
20 changes: 10 additions & 10 deletions agpl-cr-agent.adb
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ package body Agpl.Cr.Agent is
-- Get_Elapsed --
-----------------

function Get_Elapsed (This : in Object) return Duration is
use Ada.Calendar;
begin
return Clock - This.Start;
end Get_Elapsed;
-- function Get_Elapsed (This : in Object) return Duration is
-- use Ada.Calendar;
-- begin
-- return Clock - This.Start;
-- end Get_Elapsed;

--------------
-- Get_Cost --
Expand Down Expand Up @@ -247,11 +247,11 @@ package body Agpl.Cr.Agent is
-- Mark_Start --
----------------

procedure Mark_Start (This : in out Object) is
begin
This.Start := Ada.Calendar.Clock;
This.Cost := Get_Plan_Cost (This);
end Mark_Start;
-- procedure Mark_Start (This : in out Object) is
-- begin
-- This.Start := Ada.Calendar.Clock;
-- This.Cost := Get_Plan_Cost (This);
-- end Mark_Start;

----------------------
-- Modify_Task_List --
Expand Down
12 changes: 6 additions & 6 deletions agpl-cr-agent.ads
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ with Agpl.Htn.Tasks.Lists;
with Agpl.Htn.Tasks.Primitive;
with Agpl.Types.Ustrings; use Agpl.Types.Ustrings;

with Ada.Calendar;
-- with Ada.Calendar;
with Ada.Containers.Indefinite_Hashed_Maps;
with Ada.Strings.Hash;
with Ada.Tags;

package Agpl.Cr.Agent is

pragma Elaborate_Body;
pragma Preelaborate;

type Object is abstract tagged private;

Expand Down Expand Up @@ -69,8 +69,8 @@ package Agpl.Cr.Agent is
function Get_Cached_Cost (This : in Object) return Costs;
-- Returns the cost that was estimated when starting execution.

function Get_Elapsed (This : in Object) return Duration;
-- Returns the elapsed time since starting execution (Mark_Start).
-- function Get_Elapsed (This : in Object) return Duration;
-- -- Returns the elapsed time since starting execution (Mark_Start).

function Get_Cost (This : in Object; The_Task : in Htn.Tasks.Object'Class)
return Costs;
Expand Down Expand Up @@ -121,7 +121,7 @@ package Agpl.Cr.Agent is
function Has_Tasks (This : in Object) return Boolean;
-- Says if the TO DO list is not empty.

procedure Mark_Start (This : in out Object);
-- procedure Mark_Start (This : in out Object);
-- Marks the execution is starting now, and caches the estimated cost.

procedure Remove_Task (This : in out Object; Id : in Htn.Tasks.Task_Id);
Expand Down Expand Up @@ -163,7 +163,7 @@ private
-- Mnemonic for the agent.

Cost : Costs;
Start : Ada.Calendar.Time;
-- Start : Ada.Calendar.Time;

Tasks : Htn.Tasks.Lists.List;
-- The TO DO list for this agent.
Expand Down
2 changes: 1 addition & 1 deletion agpl-cr-agent_task_key.ads
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ with Ada.Containers;

package Agpl.Cr.Agent_Task_Key is

pragma Elaborate_Body;
pragma Preelaborate;

type Object (<>) is private;

Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-assigner-hungry2.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ with Agpl.Cr.Cost_Matrix;

package Agpl.Cr.Assigner.Hungry2 is

pragma Preelaborate;

type Object is new Assigner.Object with null record;

function Assign
Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-assigner-hungry3.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ with Agpl.Cr.Cost_Matrix;

package Agpl.Cr.Assigner.Hungry3 is

pragma Preelaborate;

type Object (Keep_Order : Boolean) is new Assigner.Object with null record;
-- If Keep_Order, any tasks in an Agent passed to Agents will be kept in
-- that position (at plan start).
Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-assigner-lists.ads
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ with Ada.Containers.Indefinite_Doubly_Linked_Lists;

package Agpl.Cr.Assigner.Lists is new
Ada.Containers.Indefinite_Doubly_Linked_Lists (Assigner.Object'Class);

pragma Preelaborate (Agpl.Cr.Assigner.Lists);
2 changes: 2 additions & 0 deletions agpl-cr-assigner.ads
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ with Agpl.Htn.Tasks.Lists;

package Agpl.Cr.Assigner is

pragma Preelaborate;

type Object is abstract tagged null record;

-- function Assign
Expand Down
2 changes: 1 addition & 1 deletion agpl-cr-assignment.ads
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ with Agpl.Htn.Tasks.Lists;

package Agpl.Cr.Assignment is

pragma Elaborate_Body;
pragma Preelaborate;

type Object is tagged private;

Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-controller_observer-lists.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ with Ada.Containers.Indefinite_Doubly_Linked_Lists;

package Agpl.Cr.Controller_Observer.Lists is
new Ada.Containers.Indefinite_Doubly_Linked_Lists (Object'Class);

pragma Preelaborate (Agpl.Cr.Controller_Observer.Lists);
4 changes: 3 additions & 1 deletion agpl-cr-controller_observer.ads
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --
------------------------------------------------------------------------------

with Agpl.Htn.Plan; pragma Elaborate_All (Agpl.Htn.Plan);
with Agpl.Htn.Plan;

package Agpl.Cr.Controller_Observer is

pragma Preelaborate;

type Object is abstract tagged null record;
-- This kind of object is used as a callback mechanism so the controller
-- can notify some external entity of happenings.
Expand Down
2 changes: 1 addition & 1 deletion agpl-cr-cost_matrix.ads
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ with Agpl.Htn.Tasks.Lists;

package Agpl.Cr.Cost_Matrix is

pragma Elaborate_Body;
pragma Preelaborate;

type Object is private;
-- Here we store a mapping of Agent x Start Task x End Task --> Costs
Expand Down
2 changes: 2 additions & 0 deletions agpl-cr-gap-safe_array.ads
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ with Agpl.Indefinite_Protected_Value;

package Agpl.Cr.Gap.Safe_Array is new
Agpl.Indefinite_Protected_Value (Object_Array);

pragma Preelaborate (Agpl.Cr.Gap.Safe_Array);
1 change: 1 addition & 0 deletions agpl-cr-gap-safe_array_handle.ads
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ package Agpl.Cr.Gap.Safe_Array_Handle is new
Agpl.Smart_Access_Limited (Agpl.Cr.Gap.Safe_Array.Object,
Agpl.Cr.Gap.Safe_Array.Object_Access);

pragma Preelaborate (Agpl.Cr.Gap.Safe_Array_Handle);
2 changes: 2 additions & 0 deletions agpl-cr-gap-vector-map.ads
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ new Ada.Containers.Indefinite_Hashed_Maps
Vector.Object,
Ada.Strings.Hash,
"=");

pragma Preelaborate (Agpl.Cr.Gap.Vector.Map);
2 changes: 2 additions & 0 deletions agpl-cr-gap-vector.ads
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
with Agpl.Dynamic_Vector;

package Agpl.Cr.Gap.Vector is new Dynamic_Vector (Object);

pragma Preelaborate (Agpl.Cr.Gap.Vector);
5 changes: 2 additions & 3 deletions agpl-cr-gap.adb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
with Agpl.Conversions.Io; use Agpl.Conversions.Io;

with Ada.Text_Io;
with Agpl.Text_Io;

package body Agpl.Cr.Gap is

Expand Down Expand Up @@ -60,7 +59,7 @@ package body Agpl.Cr.Gap is
----------

procedure Dump (This : Object) is
use Ada.Text_Io;
use Agpl.Text_Io;
use type Cv.Float_Array_3;
Origin : constant Cv.Point2D := (0.0, 0.0, 1.0);
begin
Expand Down
2 changes: 1 addition & 1 deletion agpl-cr-gap.ads
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ with Agpl.Cv;

package Agpl.Cr.Gap is

pragma Elaborate_Body; -- Pure;
pragma Preelaborate;

type Kinds is (Occlusive, Out_of_range);
-- Occlusive gaps are formed because some vertex prevents vision.
Expand Down
Loading

0 comments on commit bae81cc

Please sign in to comment.