CombinedText
stringlengths
4
3.42M
with Ada.Text_IO; with Ada.Directories; with Ada.Command_Line; with Templates_Parser; with CLIC.TTY; with Filesystem; with Commands; with Blueprint; use Blueprint; package body Init_Project is package IO renames Ada.Text_IO; package TT renames CLIC.TTY; use Ada.Directories; Errors : Boolean := false; Filter : constant Filter_Type := (Ordinary_File => True, Special_File => False, Directory => True); procedure Init (Path : String; ToDo: Action) is Blueprint_Folder : String := Get_Blueprint_Folder; App_Blueprint_Folder : String := Compose (Blueprint_Folder, "app"); Blueprint : String := "standard"; Blueprint_Path : String := Compose (App_Blueprint_Folder, Blueprint); Name : String := Simple_Name (Path); begin Templates_Parser.Insert (Commands.Translations, Templates_Parser.Assoc ("APPNAME", Name)); if Exists (Blueprint_Path) then IO.Put_Line (TT.Italic ("Creating a new project") & " " & TT.Bold (Path) & ":"); Iterate (Blueprint_Path, Path, ToDo); IO.New_Line; if Errors then IO.Put_Line (TT.Warn ("Created project") & " " & TT.Bold (Name) & " " & "with errors."); else IO.Put_Line (TT.Success( "Successfully created project") & " " & TT.Warn (TT.Bold (Name))); end if; IO.New_Line; IO.Put_Line (TT.Info (TT.Description ("Build your project using") & " " & TT.Terminal ("/scripts/build.sh"))); IO.Put_Line (TT.Info (TT.Description ("Add components and other items using") & " " & TT.Terminal ("glad generate"))); else IO.Put_Line (TT.Error("Blueprint not found: " & Blueprint_Path)); end if; -- TODO: Move text out into xml file end Init; end Init_Project;
with impact.d3.collision.Detector.discrete; with impact.d3.collision.convex_penetration_depth_Solver; with impact.d3.collision.simplex_Solver; with impact.d3.Shape.convex; with impact.d3.collision.Proxy; -- #include "impact.d3.collision.Detector.discrete.h" -- #include "BulletCollision/CollisionShapes/impact.d3.collision.Margin.h" -- -- class impact.d3.Shape.convex; -- #include "impact.d3.collision.simplex_Solver.h" -- class impact.d3.collision.convex_penetration_depth_Solver; package impact.d3.collision.Detector.discrete.gjk_pair -- -- impact.d3.collision.Detector.discrete.gjk_pair uses GJK to implement the impact.d3.collision.Detector.discrete. -- is type Item is new impact.d3.collision.Detector.discrete.item with private; --- Forge -- function to_gjk_pair_Detector (objectA, objectB : access impact.d3.Shape.convex.Item'Class; simplexSolver : access impact.d3.collision.simplex_Solver.Item'Class; penetrationDepthSolver : access impact.d3.collision.convex_penetration_depth_Solver.Item'Class) return Item; function to_gjk_pair_Detector (objectA, objectB : access impact.d3.Shape.convex.Item'Class; shapeTypeA, shapeTypeB : in impact.d3.collision.Proxy.BroadphaseNativeTypes; marginA, marginB : in math.Real; simplexSolver : access impact.d3.collision.simplex_Solver.Item'Class; penetrationDepthSolver : access impact.d3.collision.convex_penetration_depth_Solver.Item'Class) return Item; overriding procedure destruct (Self : in out Item) is null; --- Attributes -- procedure setMinkowskiA (Self : out Item; minkA : access impact.d3.Shape.convex.Item'Class); -- void setMinkowskiA(impact.d3.Shape.convex* minkA) -- { -- m_minkowskiA = minkA; -- } procedure setMinkowskiB (Self : out Item; minkB : access impact.d3.Shape.convex.Item'Class); -- void setMinkowskiB(impact.d3.Shape.convex* minkB) -- { -- m_minkowskiB = minkB; -- } procedure setCachedSeperatingAxis (Self : out Item; seperatingAxis : in math.Vector_3); -- void setCachedSeperatingAxis(const impact.d3.Vector& seperatingAxis) -- { -- m_cachedSeparatingAxis = seperatingAxis; -- } function getCachedSeparatingAxis (Self : in Item) return math.Vector_3; -- const impact.d3.Vector& getCachedSeparatingAxis() const -- { -- return m_cachedSeparatingAxis; -- } function getCachedSeparatingDistance (Self : in Item) return math.Real; -- impact.d3.Scalar getCachedSeparatingDistance() const -- { -- return m_cachedSeparatingDistance; -- } -- procedure setPenetrationDepthSolver (Self : out Item; penetrationDepthSolver : access impact.d3.collision.convex_penetration_depth_Solver.Item'Class); -- void setPenetrationDepthSolver(impact.d3.collision.convex_penetration_depth_Solver* penetrationDepthSolver) -- { -- m_penetrationDepthSolver = penetrationDepthSolver; -- } procedure setIgnoreMargin (Self : out Item; ignoreMargin : in Boolean); -- -- Don't use setIgnoreMargin, it's for Bullet's internal use. -- void setIgnoreMargin(bool ignoreMargin) -- { -- m_ignoreMargin = ignoreMargin; -- } -- --- Operations -- overriding procedure getClosestPoints (Self : in out Item; input : in impact.d3.collision.Detector.discrete.ClosestPointInput; output : in out impact.d3.collision.Detector.discrete.Result'Class; swapResults : in Boolean := False); procedure getClosestPointsNonVirtual (Self : in out Item'Class; input : in impact.d3.collision.Detector.discrete.ClosestPointInput; output : in out impact.d3.collision.Detector.discrete.Result'Class); private type Item is new impact.d3.collision.Detector.discrete.item with record m_cachedSeparatingAxis : aliased math.Vector_3; m_penetrationDepthSolver : access impact.d3.collision.convex_penetration_depth_Solver.Item'Class; m_simplexSolver : access impact.d3.collision.simplex_Solver.Item'Class; m_minkowskiA, m_minkowskiB : access impact.d3.Shape.convex.Item'Class; m_shapeTypeA, m_shapeTypeB : impact.d3.collision.Proxy.BroadphaseNativeTypes; m_marginA : math.Real; m_marginB : math.Real; m_ignoreMargin : Boolean; m_cachedSeparatingDistance : math.Real; -- some debugging to fix degeneracy problems -- m_lastUsedMethod, m_curIter, m_degenerateSimplex : Integer; m_catchDegeneracies : Boolean; end record; end impact.d3.collision.Detector.discrete.gjk_pair;
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure aaa_09chars is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all)); end; procedure PChar(c : in Character) is begin Character'Write (Text_Streams.Stream (Current_Output), c); end; procedure PInt(i : in Integer) is begin String'Write (Text_Streams.Stream (Current_Output), Trim(Integer'Image(i), Left)); end; begin PInt(1); PString(new char_array'( To_C("=>"))); PChar(Character'Val(1)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(1))); PString(new char_array'( To_C(" "))); PChar(Character'Val(1)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(2); PString(new char_array'( To_C("=>"))); PChar(Character'Val(2)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(2))); PString(new char_array'( To_C(" "))); PChar(Character'Val(2)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(3); PString(new char_array'( To_C("=>"))); PChar(Character'Val(3)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(3))); PString(new char_array'( To_C(" "))); PChar(Character'Val(3)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(4); PString(new char_array'( To_C("=>"))); PChar(Character'Val(4)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(4))); PString(new char_array'( To_C(" "))); PChar(Character'Val(4)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(5); PString(new char_array'( To_C("=>"))); PChar(Character'Val(5)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(5))); PString(new char_array'( To_C(" "))); PChar(Character'Val(5)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(6); PString(new char_array'( To_C("=>"))); PChar(Character'Val(6)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(6))); PString(new char_array'( To_C(" "))); PChar(Character'Val(6)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(7); PString(new char_array'( To_C("=>"))); PChar(Character'Val(7)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(7))); PString(new char_array'( To_C(" "))); PChar(Character'Val(7)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(8); PString(new char_array'( To_C("=>"))); PChar(Character'Val(8)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(8))); PString(new char_array'( To_C(" "))); PChar(Character'Val(8)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(9); PString(new char_array'( To_C("=>"))); PChar(Character'Val(9)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(9))); PString(new char_array'( To_C(" "))); PChar(Character'Val(9)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(10); PString(new char_array'( To_C("=>"))); PChar(Character'Val(10)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(10))); PString(new char_array'( To_C(" "))); PChar(Character'Val(10)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(11); PString(new char_array'( To_C("=>"))); PChar(Character'Val(11)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(11))); PString(new char_array'( To_C(" "))); PChar(Character'Val(11)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(12); PString(new char_array'( To_C("=>"))); PChar(Character'Val(12)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(12))); PString(new char_array'( To_C(" "))); PChar(Character'Val(12)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(13); PString(new char_array'( To_C("=>"))); PChar(Character'Val(13)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(13))); PString(new char_array'( To_C(" "))); PChar(Character'Val(13)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(14); PString(new char_array'( To_C("=>"))); PChar(Character'Val(14)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(14))); PString(new char_array'( To_C(" "))); PChar(Character'Val(14)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(15); PString(new char_array'( To_C("=>"))); PChar(Character'Val(15)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(15))); PString(new char_array'( To_C(" "))); PChar(Character'Val(15)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(16); PString(new char_array'( To_C("=>"))); PChar(Character'Val(16)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(16))); PString(new char_array'( To_C(" "))); PChar(Character'Val(16)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(17); PString(new char_array'( To_C("=>"))); PChar(Character'Val(17)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(17))); PString(new char_array'( To_C(" "))); PChar(Character'Val(17)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(18); PString(new char_array'( To_C("=>"))); PChar(Character'Val(18)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(18))); PString(new char_array'( To_C(" "))); PChar(Character'Val(18)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(19); PString(new char_array'( To_C("=>"))); PChar(Character'Val(19)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(19))); PString(new char_array'( To_C(" "))); PChar(Character'Val(19)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(20); PString(new char_array'( To_C("=>"))); PChar(Character'Val(20)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(20))); PString(new char_array'( To_C(" "))); PChar(Character'Val(20)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(21); PString(new char_array'( To_C("=>"))); PChar(Character'Val(21)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(21))); PString(new char_array'( To_C(" "))); PChar(Character'Val(21)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(22); PString(new char_array'( To_C("=>"))); PChar(Character'Val(22)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(22))); PString(new char_array'( To_C(" "))); PChar(Character'Val(22)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(23); PString(new char_array'( To_C("=>"))); PChar(Character'Val(23)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(23))); PString(new char_array'( To_C(" "))); PChar(Character'Val(23)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(24); PString(new char_array'( To_C("=>"))); PChar(Character'Val(24)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(24))); PString(new char_array'( To_C(" "))); PChar(Character'Val(24)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(25); PString(new char_array'( To_C("=>"))); PChar(Character'Val(25)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(25))); PString(new char_array'( To_C(" "))); PChar(Character'Val(25)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(26); PString(new char_array'( To_C("=>"))); PChar(Character'Val(26)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(26))); PString(new char_array'( To_C(" "))); PChar(Character'Val(26)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(27); PString(new char_array'( To_C("=>"))); PChar(Character'Val(27)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(27))); PString(new char_array'( To_C(" "))); PChar(Character'Val(27)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(28); PString(new char_array'( To_C("=>"))); PChar(Character'Val(28)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(28))); PString(new char_array'( To_C(" "))); PChar(Character'Val(28)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(29); PString(new char_array'( To_C("=>"))); PChar(Character'Val(29)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(29))); PString(new char_array'( To_C(" "))); PChar(Character'Val(29)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(30); PString(new char_array'( To_C("=>"))); PChar(Character'Val(30)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(30))); PString(new char_array'( To_C(" "))); PChar(Character'Val(30)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(31); PString(new char_array'( To_C("=>"))); PChar(Character'Val(31)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(31))); PString(new char_array'( To_C(" "))); PChar(Character'Val(31)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(32); PString(new char_array'( To_C("=>"))); PChar(' '); PString(new char_array'( To_C(" "))); PInt(Character'Pos(' ')); PString(new char_array'( To_C(" "))); PChar(Character'Val(32)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(33); PString(new char_array'( To_C("=>"))); PChar('!'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('!')); PString(new char_array'( To_C(" "))); PChar(Character'Val(33)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(34); PString(new char_array'( To_C("=>"))); PChar(Character'Val(34)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(34))); PString(new char_array'( To_C(" "))); PChar(Character'Val(34)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(35); PString(new char_array'( To_C("=>"))); PChar('#'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('#')); PString(new char_array'( To_C(" "))); PChar(Character'Val(35)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(36); PString(new char_array'( To_C("=>"))); PChar(Character'Val(36)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(36))); PString(new char_array'( To_C(" "))); PChar(Character'Val(36)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(37); PString(new char_array'( To_C("=>"))); PChar('%'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('%')); PString(new char_array'( To_C(" "))); PChar(Character'Val(37)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(38); PString(new char_array'( To_C("=>"))); PChar('&'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('&')); PString(new char_array'( To_C(" "))); PChar(Character'Val(38)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(39); PString(new char_array'( To_C("=>"))); PChar(Character'Val(39)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(39))); PString(new char_array'( To_C(" "))); PChar(Character'Val(39)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(40); PString(new char_array'( To_C("=>"))); PChar('('); PString(new char_array'( To_C(" "))); PInt(Character'Pos('(')); PString(new char_array'( To_C(" "))); PChar(Character'Val(40)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(41); PString(new char_array'( To_C("=>"))); PChar(')'); PString(new char_array'( To_C(" "))); PInt(Character'Pos(')')); PString(new char_array'( To_C(" "))); PChar(Character'Val(41)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(42); PString(new char_array'( To_C("=>"))); PChar('*'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('*')); PString(new char_array'( To_C(" "))); PChar(Character'Val(42)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(43); PString(new char_array'( To_C("=>"))); PChar('+'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('+')); PString(new char_array'( To_C(" "))); PChar(Character'Val(43)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(44); PString(new char_array'( To_C("=>"))); PChar(','); PString(new char_array'( To_C(" "))); PInt(Character'Pos(',')); PString(new char_array'( To_C(" "))); PChar(Character'Val(44)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(45); PString(new char_array'( To_C("=>"))); PChar('-'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('-')); PString(new char_array'( To_C(" "))); PChar(Character'Val(45)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(46); PString(new char_array'( To_C("=>"))); PChar('.'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('.')); PString(new char_array'( To_C(" "))); PChar(Character'Val(46)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(47); PString(new char_array'( To_C("=>"))); PChar('/'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('/')); PString(new char_array'( To_C(" "))); PChar(Character'Val(47)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(48); PString(new char_array'( To_C("=>"))); PChar('0'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('0')); PString(new char_array'( To_C(" "))); PChar(Character'Val(48)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(49); PString(new char_array'( To_C("=>"))); PChar('1'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('1')); PString(new char_array'( To_C(" "))); PChar(Character'Val(49)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(50); PString(new char_array'( To_C("=>"))); PChar('2'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('2')); PString(new char_array'( To_C(" "))); PChar(Character'Val(50)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(51); PString(new char_array'( To_C("=>"))); PChar('3'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('3')); PString(new char_array'( To_C(" "))); PChar(Character'Val(51)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(52); PString(new char_array'( To_C("=>"))); PChar('4'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('4')); PString(new char_array'( To_C(" "))); PChar(Character'Val(52)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(53); PString(new char_array'( To_C("=>"))); PChar('5'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('5')); PString(new char_array'( To_C(" "))); PChar(Character'Val(53)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(54); PString(new char_array'( To_C("=>"))); PChar('6'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('6')); PString(new char_array'( To_C(" "))); PChar(Character'Val(54)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(55); PString(new char_array'( To_C("=>"))); PChar('7'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('7')); PString(new char_array'( To_C(" "))); PChar(Character'Val(55)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(56); PString(new char_array'( To_C("=>"))); PChar('8'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('8')); PString(new char_array'( To_C(" "))); PChar(Character'Val(56)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(57); PString(new char_array'( To_C("=>"))); PChar('9'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('9')); PString(new char_array'( To_C(" "))); PChar(Character'Val(57)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(58); PString(new char_array'( To_C("=>"))); PChar(':'); PString(new char_array'( To_C(" "))); PInt(Character'Pos(':')); PString(new char_array'( To_C(" "))); PChar(Character'Val(58)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(59); PString(new char_array'( To_C("=>"))); PChar(';'); PString(new char_array'( To_C(" "))); PInt(Character'Pos(';')); PString(new char_array'( To_C(" "))); PChar(Character'Val(59)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(60); PString(new char_array'( To_C("=>"))); PChar('<'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('<')); PString(new char_array'( To_C(" "))); PChar(Character'Val(60)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(61); PString(new char_array'( To_C("=>"))); PChar('='); PString(new char_array'( To_C(" "))); PInt(Character'Pos('=')); PString(new char_array'( To_C(" "))); PChar(Character'Val(61)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(62); PString(new char_array'( To_C("=>"))); PChar('>'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('>')); PString(new char_array'( To_C(" "))); PChar(Character'Val(62)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(63); PString(new char_array'( To_C("=>"))); PChar('?'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('?')); PString(new char_array'( To_C(" "))); PChar(Character'Val(63)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(64); PString(new char_array'( To_C("=>"))); PChar('@'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('@')); PString(new char_array'( To_C(" "))); PChar(Character'Val(64)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(65); PString(new char_array'( To_C("=>"))); PChar('A'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('A')); PString(new char_array'( To_C(" "))); PChar(Character'Val(65)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(66); PString(new char_array'( To_C("=>"))); PChar('B'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('B')); PString(new char_array'( To_C(" "))); PChar(Character'Val(66)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(67); PString(new char_array'( To_C("=>"))); PChar('C'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('C')); PString(new char_array'( To_C(" "))); PChar(Character'Val(67)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(68); PString(new char_array'( To_C("=>"))); PChar('D'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('D')); PString(new char_array'( To_C(" "))); PChar(Character'Val(68)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(69); PString(new char_array'( To_C("=>"))); PChar('E'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('E')); PString(new char_array'( To_C(" "))); PChar(Character'Val(69)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(70); PString(new char_array'( To_C("=>"))); PChar('F'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('F')); PString(new char_array'( To_C(" "))); PChar(Character'Val(70)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(71); PString(new char_array'( To_C("=>"))); PChar('G'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('G')); PString(new char_array'( To_C(" "))); PChar(Character'Val(71)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(72); PString(new char_array'( To_C("=>"))); PChar('H'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('H')); PString(new char_array'( To_C(" "))); PChar(Character'Val(72)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(73); PString(new char_array'( To_C("=>"))); PChar('I'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('I')); PString(new char_array'( To_C(" "))); PChar(Character'Val(73)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(74); PString(new char_array'( To_C("=>"))); PChar('J'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('J')); PString(new char_array'( To_C(" "))); PChar(Character'Val(74)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(75); PString(new char_array'( To_C("=>"))); PChar('K'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('K')); PString(new char_array'( To_C(" "))); PChar(Character'Val(75)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(76); PString(new char_array'( To_C("=>"))); PChar('L'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('L')); PString(new char_array'( To_C(" "))); PChar(Character'Val(76)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(77); PString(new char_array'( To_C("=>"))); PChar('M'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('M')); PString(new char_array'( To_C(" "))); PChar(Character'Val(77)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(78); PString(new char_array'( To_C("=>"))); PChar('N'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('N')); PString(new char_array'( To_C(" "))); PChar(Character'Val(78)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(79); PString(new char_array'( To_C("=>"))); PChar('O'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('O')); PString(new char_array'( To_C(" "))); PChar(Character'Val(79)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(80); PString(new char_array'( To_C("=>"))); PChar('P'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('P')); PString(new char_array'( To_C(" "))); PChar(Character'Val(80)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(81); PString(new char_array'( To_C("=>"))); PChar('Q'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('Q')); PString(new char_array'( To_C(" "))); PChar(Character'Val(81)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(82); PString(new char_array'( To_C("=>"))); PChar('R'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('R')); PString(new char_array'( To_C(" "))); PChar(Character'Val(82)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(83); PString(new char_array'( To_C("=>"))); PChar('S'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('S')); PString(new char_array'( To_C(" "))); PChar(Character'Val(83)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(84); PString(new char_array'( To_C("=>"))); PChar('T'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('T')); PString(new char_array'( To_C(" "))); PChar(Character'Val(84)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(85); PString(new char_array'( To_C("=>"))); PChar('U'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('U')); PString(new char_array'( To_C(" "))); PChar(Character'Val(85)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(86); PString(new char_array'( To_C("=>"))); PChar('V'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('V')); PString(new char_array'( To_C(" "))); PChar(Character'Val(86)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(87); PString(new char_array'( To_C("=>"))); PChar('W'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('W')); PString(new char_array'( To_C(" "))); PChar(Character'Val(87)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(88); PString(new char_array'( To_C("=>"))); PChar('X'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('X')); PString(new char_array'( To_C(" "))); PChar(Character'Val(88)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(89); PString(new char_array'( To_C("=>"))); PChar('Y'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('Y')); PString(new char_array'( To_C(" "))); PChar(Character'Val(89)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(90); PString(new char_array'( To_C("=>"))); PChar('Z'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('Z')); PString(new char_array'( To_C(" "))); PChar(Character'Val(90)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(91); PString(new char_array'( To_C("=>"))); PChar('['); PString(new char_array'( To_C(" "))); PInt(Character'Pos('[')); PString(new char_array'( To_C(" "))); PChar(Character'Val(91)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(92); PString(new char_array'( To_C("=>"))); PChar(Character'Val(92)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(92))); PString(new char_array'( To_C(" "))); PChar(Character'Val(92)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(93); PString(new char_array'( To_C("=>"))); PChar(']'); PString(new char_array'( To_C(" "))); PInt(Character'Pos(']')); PString(new char_array'( To_C(" "))); PChar(Character'Val(93)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(94); PString(new char_array'( To_C("=>"))); PChar('^'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('^')); PString(new char_array'( To_C(" "))); PChar(Character'Val(94)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(95); PString(new char_array'( To_C("=>"))); PChar('_'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('_')); PString(new char_array'( To_C(" "))); PChar(Character'Val(95)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(96); PString(new char_array'( To_C("=>"))); PChar('`'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('`')); PString(new char_array'( To_C(" "))); PChar(Character'Val(96)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(97); PString(new char_array'( To_C("=>"))); PChar('a'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('a')); PString(new char_array'( To_C(" "))); PChar(Character'Val(97)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(98); PString(new char_array'( To_C("=>"))); PChar('b'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('b')); PString(new char_array'( To_C(" "))); PChar(Character'Val(98)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(99); PString(new char_array'( To_C("=>"))); PChar('c'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('c')); PString(new char_array'( To_C(" "))); PChar(Character'Val(99)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(100); PString(new char_array'( To_C("=>"))); PChar('d'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('d')); PString(new char_array'( To_C(" "))); PChar(Character'Val(100)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(101); PString(new char_array'( To_C("=>"))); PChar('e'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('e')); PString(new char_array'( To_C(" "))); PChar(Character'Val(101)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(102); PString(new char_array'( To_C("=>"))); PChar('f'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('f')); PString(new char_array'( To_C(" "))); PChar(Character'Val(102)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(103); PString(new char_array'( To_C("=>"))); PChar('g'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('g')); PString(new char_array'( To_C(" "))); PChar(Character'Val(103)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(104); PString(new char_array'( To_C("=>"))); PChar('h'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('h')); PString(new char_array'( To_C(" "))); PChar(Character'Val(104)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(105); PString(new char_array'( To_C("=>"))); PChar('i'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('i')); PString(new char_array'( To_C(" "))); PChar(Character'Val(105)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(106); PString(new char_array'( To_C("=>"))); PChar('j'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('j')); PString(new char_array'( To_C(" "))); PChar(Character'Val(106)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(107); PString(new char_array'( To_C("=>"))); PChar('k'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('k')); PString(new char_array'( To_C(" "))); PChar(Character'Val(107)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(108); PString(new char_array'( To_C("=>"))); PChar('l'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('l')); PString(new char_array'( To_C(" "))); PChar(Character'Val(108)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(109); PString(new char_array'( To_C("=>"))); PChar('m'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('m')); PString(new char_array'( To_C(" "))); PChar(Character'Val(109)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(110); PString(new char_array'( To_C("=>"))); PChar('n'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('n')); PString(new char_array'( To_C(" "))); PChar(Character'Val(110)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(111); PString(new char_array'( To_C("=>"))); PChar('o'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('o')); PString(new char_array'( To_C(" "))); PChar(Character'Val(111)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(112); PString(new char_array'( To_C("=>"))); PChar('p'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('p')); PString(new char_array'( To_C(" "))); PChar(Character'Val(112)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(113); PString(new char_array'( To_C("=>"))); PChar('q'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('q')); PString(new char_array'( To_C(" "))); PChar(Character'Val(113)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(114); PString(new char_array'( To_C("=>"))); PChar('r'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('r')); PString(new char_array'( To_C(" "))); PChar(Character'Val(114)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(115); PString(new char_array'( To_C("=>"))); PChar('s'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('s')); PString(new char_array'( To_C(" "))); PChar(Character'Val(115)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(116); PString(new char_array'( To_C("=>"))); PChar('t'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('t')); PString(new char_array'( To_C(" "))); PChar(Character'Val(116)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(117); PString(new char_array'( To_C("=>"))); PChar('u'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('u')); PString(new char_array'( To_C(" "))); PChar(Character'Val(117)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(118); PString(new char_array'( To_C("=>"))); PChar('v'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('v')); PString(new char_array'( To_C(" "))); PChar(Character'Val(118)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(119); PString(new char_array'( To_C("=>"))); PChar('w'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('w')); PString(new char_array'( To_C(" "))); PChar(Character'Val(119)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(120); PString(new char_array'( To_C("=>"))); PChar('x'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('x')); PString(new char_array'( To_C(" "))); PChar(Character'Val(120)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(121); PString(new char_array'( To_C("=>"))); PChar('y'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('y')); PString(new char_array'( To_C(" "))); PChar(Character'Val(121)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(122); PString(new char_array'( To_C("=>"))); PChar('z'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('z')); PString(new char_array'( To_C(" "))); PChar(Character'Val(122)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(123); PString(new char_array'( To_C("=>"))); PChar('{'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('{')); PString(new char_array'( To_C(" "))); PChar(Character'Val(123)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(124); PString(new char_array'( To_C("=>"))); PChar('|'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('|')); PString(new char_array'( To_C(" "))); PChar(Character'Val(124)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(125); PString(new char_array'( To_C("=>"))); PChar('}'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('}')); PString(new char_array'( To_C(" "))); PChar(Character'Val(125)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(126); PString(new char_array'( To_C("=>"))); PChar('~'); PString(new char_array'( To_C(" "))); PInt(Character'Pos('~')); PString(new char_array'( To_C(" "))); PChar(Character'Val(126)); PString(new char_array'( To_C("" & Character'Val(10)))); PInt(127); PString(new char_array'( To_C("=>"))); PChar(Character'Val(127)); PString(new char_array'( To_C(" "))); PInt(Character'Pos(Character'Val(127))); PString(new char_array'( To_C(" "))); PChar(Character'Val(127)); PString(new char_array'( To_C("" & Character'Val(10)))); end;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T . E X C E P T I O N _ A C T I O N S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2002-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Conversion; with System; with System.Soft_Links; use System.Soft_Links; with System.Standard_Library; use System.Standard_Library; with System.Exception_Table; use System.Exception_Table; package body GNAT.Exception_Actions is Global_Action : Exception_Action; pragma Import (C, Global_Action, "__gnat_exception_actions_global_action"); -- Imported from Ada.Exceptions. Any change in the external name needs to -- be coordinated with a-except.adb Raise_Hook_Initialized : Boolean; pragma Import (Ada, Raise_Hook_Initialized, "__gnat_exception_actions_initialized"); function To_Raise_Action is new Ada.Unchecked_Conversion (Exception_Action, Raise_Action); -- ??? Would be nice to have this in System.Standard_Library function To_Data is new Ada.Unchecked_Conversion (Exception_Id, Exception_Data_Ptr); function To_Id is new Ada.Unchecked_Conversion (Exception_Data_Ptr, Exception_Id); ---------------------------- -- Register_Global_Action -- ---------------------------- procedure Register_Global_Action (Action : Exception_Action) is begin Lock_Task.all; Global_Action := Action; Unlock_Task.all; end Register_Global_Action; ------------------------ -- Register_Id_Action -- ------------------------ procedure Register_Id_Action (Id : Exception_Id; Action : Exception_Action) is begin if Id = Null_Id then raise Program_Error; end if; Lock_Task.all; To_Data (Id).Raise_Hook := To_Raise_Action (Action); Raise_Hook_Initialized := True; Unlock_Task.all; end Register_Id_Action; --------------- -- Core_Dump -- --------------- procedure Core_Dump (Occurrence : Exception_Occurrence) is separate; ---------------- -- Name_To_Id -- ---------------- function Name_To_Id (Name : String) return Exception_Id is begin return To_Id (Internal_Exception (Name, Create_If_Not_Exist => False)); end Name_To_Id; --------------------------------- -- Registered_Exceptions_Count -- --------------------------------- function Registered_Exceptions_Count return Natural renames System.Exception_Table.Registered_Exceptions_Count; ------------------------------- -- Get_Registered_Exceptions -- ------------------------------- -- This subprogram isn't an iterator to avoid concurrency problems, -- since the exceptions are registered dynamically. Since we have to lock -- the runtime while computing this array, this means that any callback in -- an active iterator would be unable to access the runtime. procedure Get_Registered_Exceptions (List : out Exception_Id_Array; Last : out Integer) is Ids : Exception_Data_Array (List'Range); begin Get_Registered_Exceptions (Ids, Last); for L in List'First .. Last loop List (L) := To_Id (Ids (L)); end loop; end Get_Registered_Exceptions; end GNAT.Exception_Actions;
package body Disp2_Pkg is function Impl_Of (Self : access Object) return Object_Ptr is begin return Object_Ptr (Self); end Impl_Of; end Disp2_Pkg;
with Protypo.API.Consumers; with Protypo.API.Symbols; with Protypo.Api.Engine_Values; private with Protypo.Code_Trees; with Utilities; package Protypo.API.Interpreters is type Template_Type is new String; type Compiled_Code is limited private; procedure Dump (X : Compiled_Code); -- Print a tree representation of the content of the compiled -- code. Useful mainly for debug. function Compile (Program : Template_Type; Base_Dir : String := "") return Compiled_Code; procedure Compile (Target : out Compiled_Code; Program : Template_Type; Base_Dir : String := ""); type Interpreter_Type is tagged limited private; procedure Define (Interpreter : in out Interpreter_Type; Name : ID; Value : Engine_Values.Engine_Value); -- Define a new symbol in the global namespace of the interpreter procedure Run (Interpreter : in out Interpreter_Type; Program : Template_Type; Consumer : Consumers.Consumer_Access); -- Run the specified template and send the result to the consumer procedure Run (Interpreter : in out Interpreter_Type; Program : Compiled_Code; Consumer : Consumers.Consumer_Access); -- Run the pre-compiled code and send the result to the consumer Standard_Output : constant String := "-"; procedure Expand_Template (Interpreter : in out Interpreter_Type; Input_Filename : String; Target_Filenane : String); -- Expand the given template and write the result to the specified -- target. To write to standard output use "-" (or the -- Standar_Output constant) function Slurp (Filename : String) return Template_Type; -- Read a template from the specified file. Useful in conjuction with -- Expand_Template above private type Compiled_Code is limited record Code : Protypo.Code_Trees.Parsed_Code; end record; type Interpreter_Type is tagged limited record Symbol_Table : Symbols.Table; end record; function Slurp (Filename : String) return Template_Type is (Template_Type (Utilities.Slurp (Filename))); procedure Bye (X : in out Compiled_Code); end Protypo.API.Interpreters;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Curses_Demo -- -- -- -- S P E C -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.9 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ package Sample.Curses_Demo is procedure Demo; end Sample.Curses_Demo;
package body System.Fat_LLF is function frexp (value : Long_Long_Float; exp : access Integer) return Long_Long_Float with Import, Convention => Intrinsic, External_Name => "__builtin_frexpl"; function inf return Long_Long_Float with Import, Convention => Intrinsic, External_Name => "__builtin_infl"; function isfinite (X : Long_Long_Float) return Integer with Import, Convention => Intrinsic, External_Name => "__builtin_isfinite"; pragma Warnings (Off, isfinite); -- [gcc 4.6] excessive prototype checking package body Attr_Long_Long_Float is function Compose (Fraction : Long_Long_Float; Exponent : Integer) return Long_Long_Float is begin return Scaling (Attr_Long_Long_Float.Fraction (Fraction), Exponent); end Compose; function Exponent (X : Long_Long_Float) return Integer is Result : aliased Integer; Dummy : Long_Long_Float; begin Dummy := frexp (X, Result'Access); return Result; end Exponent; function Fraction (X : Long_Long_Float) return Long_Long_Float is Dummy : aliased Integer; begin return frexp (X, Dummy'Access); end Fraction; function Leading_Part (X : Long_Long_Float; Radix_Digits : Integer) return Long_Long_Float is S : constant Integer := Radix_Digits - Exponent (X); begin return Scaling (Truncation (Scaling (X, S)), -S); end Leading_Part; function Machine (X : Long_Long_Float) return Long_Long_Float is begin return X; -- ??? end Machine; function Pred (X : Long_Long_Float) return Long_Long_Float is begin return Adjacent (X, -inf); end Pred; function Succ (X : Long_Long_Float) return Long_Long_Float is begin return Adjacent (X, inf); end Succ; function Unbiased_Rounding (X : Long_Long_Float) return Long_Long_Float is begin return X - Remainder (X, 1.0); end Unbiased_Rounding; function Valid (X : not null access Long_Long_Float) return Boolean is begin return isfinite (X.all) /= 0; end Valid; end Attr_Long_Long_Float; end System.Fat_LLF;
-- Abstract : -- -- See spec. -- -- Copyright (C) 2017 - 2019 Free Software Foundation, Inc. -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. pragma License (GPL); with Ada.Strings.Fixed; with Ada.Text_IO; use Ada.Text_IO; with System.Multiprocessors; with WisiToken.BNF.Generate_Grammar; with WisiToken.BNF.Utils; with WisiToken.Generate; use WisiToken.Generate; with WisiToken.Parse.LR; with WisiToken.Productions; with WisiToken.Syntax_Trees; package body WisiToken.BNF.Output_Ada_Common is -- Body subprograms, alphabetical function Duplicate_Reduce (State : in Parse.LR.Parse_State) return Boolean is use Parse.LR; Action_Node : Parse_Action_Node_Ptr; First : Boolean := True; Action : Reduce_Action_Rec; begin for Node of State.Action_List loop Action_Node := Node.Actions; if Action_Node.Next /= null then -- conflict return False; elsif Action_Node.Item.Verb /= Reduce then return False; end if; if First then Action := Action_Node.Item; First := False; else if not Equal (Action, Action_Node.Item) then return False; end if; end if; end loop; return True; end Duplicate_Reduce; function Symbols_Image (State : in Parse.LR.Parse_State) return String is use all type Ada.Containers.Count_Type; use Ada.Strings.Unbounded; Result : Unbounded_String; Need_Comma : Boolean := False; begin if State.Action_List.Length = 1 then return "(1 => " & Token_ID'Image (State.Action_List (1).Symbol) & ")"; else Result := +"("; for Node of State.Action_List loop Result := Result & (if Need_Comma then ", " else "") & Trimmed_Image (Node.Symbol); Need_Comma := True; end loop; Result := Result & ")"; return -Result; end if; end Symbols_Image; ---------- -- Public subprograms in alphabetical order procedure Create_Ada_Actions_Spec (Output_File_Name : in String; Package_Name : in String; Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Common_Data : in Output_Ada_Common.Common_Data; Generate_Data : aliased in WisiToken.BNF.Generate_Utils.Generate_Data) is use Generate_Utils; Descriptor : WisiToken.Descriptor renames Generate_Data.Descriptor.all; Spec_File : File_Type; Paren_Done : Boolean := False; Cursor : Token_Cursor := First (Generate_Data, Non_Grammar => True, Nonterminals => True); begin Create (Spec_File, Out_File, Output_File_Name); Set_Output (Spec_File); Indent := 1; Put_File_Header (Ada_Comment, Use_Tuple => True, Tuple => (Common_Data.Generate_Algorithm, Common_Data.Output_Language, Common_Data.Lexer, Common_Data.Interface_Kind, Common_Data.Text_Rep)); Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Copyright_License)); New_Line; if not (Input_Data.Action_Count > 0 or Input_Data.Check_Count > 0) then Put_Line ("with WisiToken;"); end if; if Input_Data.Action_Count > 0 then Put_Line ("with WisiToken.Syntax_Trees;"); end if; if Input_Data.Check_Count > 0 then Put_Line ("with WisiToken.Lexer;"); Put_Line ("with WisiToken.Semantic_Checks;"); end if; Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Actions_Spec_Context)); Put_Line ("package " & Package_Name & " is"); Indent := Indent + 3; New_Line; Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Actions_Spec_Pre)); Indent_Line ("Descriptor : aliased WisiToken.Descriptor :="); Indent_Line (" (First_Terminal =>" & WisiToken.Token_ID'Image (Descriptor.First_Terminal) & ","); Indent := Indent + 3; Indent_Line ("Last_Terminal =>" & WisiToken.Token_ID'Image (Descriptor.Last_Terminal) & ","); Indent_Line ("First_Nonterminal =>" & WisiToken.Token_ID'Image (Descriptor.First_Nonterminal) & ","); Indent_Line ("Last_Nonterminal =>" & WisiToken.Token_ID'Image (Descriptor.Last_Nonterminal) & ","); Indent_Line ("EOI_ID =>" & WisiToken.Token_ID'Image (Descriptor.EOI_ID) & ","); Indent_Line ("Accept_ID =>" & WisiToken.Token_ID'Image (Descriptor.Accept_ID) & ","); Indent_Line ("Case_Insensitive => " & Image (Input_Data.Language_Params.Case_Insensitive) & ","); Indent_Line ("New_Line_ID =>" & WisiToken.Token_ID'Image (Descriptor.New_Line_ID) & ","); Indent_Line ("String_1_ID =>" & WisiToken.Token_ID'Image (Descriptor.String_1_ID) & ","); Indent_Line ("String_2_ID =>" & WisiToken.Token_ID'Image (Descriptor.String_2_ID) & ","); Indent_Line ("Image =>"); Indent_Start (" ("); Indent := Indent + 3; loop exit when Is_Done (Cursor); if Paren_Done then Indent_Start ("new String'(""" & (Name (Cursor))); else Put ("new String'(""" & (Name (Cursor))); Paren_Done := True; end if; Next (Cursor, Nonterminals => True); if Is_Done (Cursor) then Put_Line (""")),"); else Put_Line ("""),"); end if; end loop; Indent := Indent - 3; Indent_Line ("Terminal_Image_Width =>" & Integer'Image (Descriptor.Terminal_Image_Width) & ","); Indent_Line ("Image_Width =>" & Integer'Image (Descriptor.Image_Width) & ","); Indent_Line ("Last_Lookahead =>" & WisiToken.Token_ID'Image (Descriptor.Last_Lookahead) & ");"); Indent := Indent - 3; New_Line; if Input_Data.Language_Params.Declare_Enums then Paren_Done := False; Cursor := First (Generate_Data, Non_Grammar => True, Nonterminals => True); Indent_Line ("type Token_Enum_ID is"); Indent_Start (" ("); Indent := Indent + 3; loop exit when Is_Done (Cursor); if Paren_Done then Indent_Start (To_Token_Ada_Name (Name (Cursor))); else Put (To_Token_Ada_Name (Name (Cursor))); Paren_Done := True; end if; Next (Cursor, Nonterminals => True); if Is_Done (Cursor) then Put_Line (");"); else Put_Line (","); end if; end loop; Indent := Indent - 3; New_Line; Indent_Line ("type Token_Enum_ID_Array is array (Positive range <>) of Token_Enum_ID;"); Indent_Line ("use all type WisiToken.Token_ID;"); Indent_Line ("function ""+"" (Item : in Token_Enum_ID) return WisiToken.Token_ID"); Indent_Line (" is (WisiToken.Token_ID'First + Token_Enum_ID'Pos (Item));"); Indent_Line ("function To_Token_Enum (Item : in WisiToken.Token_ID) return Token_Enum_ID"); Indent_Line (" is (Token_Enum_ID'Val (Item - WisiToken.Token_ID'First));"); Indent_Line ("function ""-"" (Item : in WisiToken.Token_ID) return Token_Enum_ID renames To_Token_Enum;"); New_Line; end if; for Name_List of Generate_Data.Action_Names.all loop if Name_List /= null then for Name of Name_List.all loop if Name /= null then Indent_Line ("procedure " & Name.all); Indent_Line (" (User_Data : in out WisiToken.Syntax_Trees.User_Data_Type'Class;"); Indent_Line (" Tree : in out WisiToken.Syntax_Trees.Tree;"); Indent_Line (" Nonterm : in WisiToken.Syntax_Trees.Valid_Node_Index;"); Indent_Line (" Tokens : in WisiToken.Syntax_Trees.Valid_Node_Index_Array);"); end if; end loop; end if; end loop; for Name_List of Generate_Data.Check_Names.all loop if Name_List /= null then for Name of Name_List.all loop if Name /= null then Indent_Line ("function " & Name.all); Indent_Line (" (Lexer : access constant WisiToken.Lexer.Instance'Class;"); Indent_Line (" Nonterm : in out WisiToken.Recover_Token;"); Indent_Line (" Tokens : in WisiToken.Recover_Token_Array;"); Indent_Line (" Recover_Active : in Boolean)"); Indent_Line (" return WisiToken.Semantic_Checks.Check_Status;"); end if; end loop; end if; end loop; Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Actions_Spec_Post)); Put_Line ("end " & Package_Name & ";"); Close (Spec_File); Set_Output (Standard_Output); end Create_Ada_Actions_Spec; procedure Create_Ada_Main_Spec (Output_File_Name : in String; Main_Package_Name : in String; Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Common_Data : in Output_Ada_Common.Common_Data) is Lower_Package_Name : constant String := To_Lower (Main_Package_Name); Spec_File : File_Type; procedure LR_Process is begin Indent_Line ("procedure Create_Parser"); if Input_Data.Language_Params.Error_Recover then Indent_Line (" (Parser : out WisiToken.Parse.LR.Parser.Parser;"); Indent_Line (" Language_Fixes : in WisiToken.Parse.LR.Parser.Language_Fixes_Access;"); Indent_Line (" Language_Matching_Begin_Tokens : in " & "WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;"); Indent_Line (" Language_String_ID_Set : in " & "WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access;"); else Indent_Line (" (Parser : out WisiToken.Parse.LR.Parser_No_Recover.Parser;"); Indent_Line (" -- no error recovery"); end if; Indent_Line (" Trace : not null access WisiToken.Trace'Class;"); Indent_Start (" User_Data : in WisiToken.Syntax_Trees.User_Data_Access"); if Common_Data.Text_Rep then Put_Line (";"); Indent_Line (" Text_Rep_File_Name : in String);"); else Put_Line (");"); end if; New_Line; end LR_Process; procedure Packrat_Process is begin Indent_Line ("function Create_Parser"); Indent_Line (" (Trace : not null access WisiToken.Trace'Class;"); Indent_Line (" User_Data : in WisiToken.Syntax_Trees.User_Data_Access)"); Indent_Line (" return WisiToken.Parse.Base_Parser'Class;"); New_Line; end Packrat_Process; begin if Common_Data.Generate_Algorithm = External then raise SAL.Programmer_Error; end if; Create (Spec_File, Out_File, Output_File_Name); Set_Output (Spec_File); Indent := 1; Put_File_Header (Ada_Comment, Use_Tuple => True, Tuple => (Common_Data.Generate_Algorithm, Common_Data.Output_Language, Common_Data.Lexer, Common_Data.Interface_Kind, Common_Data.Text_Rep)); Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Copyright_License)); New_Line; case Common_Data.Output_Language is when Ada_Lang => Put_Line ("with WisiToken.Syntax_Trees;"); when Ada_Emacs_Lang => case Common_Data.Interface_Kind is when Process => Put_Line ("with WisiToken.Syntax_Trees;"); when Module => Put_Line ("with Emacs_Module_Aux;"); Put_Line ("with emacs_module_h;"); Put_Line ("with Interfaces.C;"); Put_Line ("with WisiToken.Semantic_State;"); end case; end case; case Common_Data.Generate_Algorithm is when LR_Generate_Algorithm => if Input_Data.Language_Params.Error_Recover then Put_Line ("with WisiToken.Parse.LR.Parser;"); else Put_Line ("with WisiToken.Parse.LR.Parser_No_Recover;"); end if; when Packrat_Generate_Algorithm => Put_Line ("with WisiToken.Parse;"); when External => null; end case; Put_Line ("package " & Main_Package_Name & " is"); Indent := Indent + 3; New_Line; case Common_Data.Output_Language is when Ada_Lang => case Common_Data.Generate_Algorithm is when LR_Generate_Algorithm => LR_Process; when Packrat_Generate_Algorithm => Packrat_Process; when External => null; end case; when Ada_Emacs_Lang => case Common_Data.Interface_Kind is when Process => case Common_Data.Generate_Algorithm is when LR_Generate_Algorithm => LR_Process; when Packrat_Generate_Algorithm => Packrat_Process; when External => null; end case; when Module => Indent_Line ("function Parse (Env : Emacs_Module_Aux.Emacs_Env_Access) return emacs_module_h.emacs_value;"); Indent_Line ("pragma Export (C, Parse, """ & Lower_Package_Name & "_wisi_module_parse"");"); Indent_Line ("function Init (Env : Emacs_Module_Aux.Emacs_Env_Access) return Interfaces.C.int;"); Indent_Line ("pragma Export (C, Init, """ & Lower_Package_Name & "_wisi_module_parse_init"");"); New_Line; end case; end case; Put_Line ("end " & Main_Package_Name & ";"); Close (Spec_File); Set_Output (Standard_Output); end Create_Ada_Main_Spec; procedure Create_External_Main_Spec (Main_Package_Name : in String; Tuple : in Generate_Tuple; Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type) is File_Name : constant String := To_Lower (Main_Package_Name) & ".ads"; Spec_File : File_Type; begin Create (Spec_File, Out_File, File_Name); Set_Output (Spec_File); Indent := 1; Put_File_Header (Ada_Comment, Use_Tuple => True, Tuple => Tuple); Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Copyright_License)); New_Line; Put_Line ("with WisiToken.Productions;"); Put_Line ("package " & Main_Package_Name & " is"); Indent := Indent + 3; New_Line; Indent_Line ("function Create_Grammar return WisiToken.Productions.Prod_Arrays.Vector;"); Indent := Indent - 3; Put_Line ("end " & Main_Package_Name & ";"); Close (Spec_File); Set_Output (Standard_Output); end Create_External_Main_Spec; procedure Create_LR_Parser_Core_1 (Common_Data : in Output_Ada_Common.Common_Data; Generate_Data : in WisiToken.BNF.Generate_Utils.Generate_Data) is use Ada.Strings.Unbounded; subtype Nonterminal_ID is Token_ID range Generate_Data.Grammar.First_Index .. Generate_Data.Grammar.Last_Index; Table : WisiToken.Parse.LR.Parse_Table_Ptr renames Generate_Data.LR_Parse_Table; Line : Unbounded_String; procedure Append (Item : in String) is begin Line := Line & Item; end Append; procedure Put (Label : in String; Item : in Token_ID_Array_Natural) is begin Indent_Line (Label & " =>"); Indent_Start (" ("); Indent := Indent + 3; Line := +""; for I in Item'Range loop Append (Trimmed_Image (Item (I))); if I = Item'Last then Append ("),"); else Append (", "); end if; end loop; Indent_Wrap (-Line); Indent := Indent - 3; end Put; begin Indent_Line ("McKenzie_Param : constant McKenzie_Param_Type :="); Indent_Line (" (First_Terminal =>" & Token_ID'Image (Table.McKenzie_Param.First_Terminal) & ","); Indent := Indent + 3; Indent_Line ("Last_Terminal =>" & Token_ID'Image (Table.McKenzie_Param.Last_Terminal) & ","); Indent_Line ("First_Nonterminal =>" & Token_ID'Image (Table.McKenzie_Param.First_Nonterminal) & ","); Indent_Line ("Last_Nonterminal =>" & Token_ID'Image (Table.McKenzie_Param.Last_Nonterminal) & ","); Put ("Insert", Table.McKenzie_Param.Insert); Put ("Delete", Table.McKenzie_Param.Delete); Put ("Push_Back", Table.McKenzie_Param.Push_Back); Put ("Undo_Reduce", Table.McKenzie_Param.Undo_Reduce); Indent_Line ("Minimal_Complete_Cost_Delta => " & Integer'Image (Table.McKenzie_Param.Minimal_Complete_Cost_Delta) & ","); Indent_Line ("Fast_Forward => " & Integer'Image (Table.McKenzie_Param.Fast_Forward) & ","); Indent_Line ("Matching_Begin => " & Integer'Image (Table.McKenzie_Param.Matching_Begin) & ","); Indent_Line ("Ignore_Check_Fail =>" & Integer'Image (Table.McKenzie_Param.Ignore_Check_Fail) & ","); Indent_Line ("Task_Count =>" & System.Multiprocessors.CPU_Range'Image (Table.McKenzie_Param.Task_Count) & ","); Indent_Line ("Check_Limit =>" & Token_Index'Image (Table.McKenzie_Param.Check_Limit) & ","); Indent_Line ("Check_Delta_Limit =>" & Integer'Image (Table.McKenzie_Param.Check_Delta_Limit) & ","); Indent_Line ("Enqueue_Limit =>" & Integer'Image (Table.McKenzie_Param.Enqueue_Limit) & ");"); Indent := Indent - 3; New_Line; if Common_Data.Text_Rep then Indent_Line ("function Actions return WisiToken.Parse.LR.Semantic_Action_Array_Arrays.Vector"); Indent_Line ("is begin"); Indent := Indent + 3; Indent_Line ("return Acts : WisiToken.Parse.LR.Semantic_Action_Array_Arrays.Vector do"); Indent := Indent + 3; Indent_Line ("Acts.Set_First_Last (" & Trimmed_Image (Generate_Data.Grammar.First_Index) & ", " & Trimmed_Image (Generate_Data.Grammar.Last_Index) & ");"); for I in Nonterminal_ID loop declare P : Productions.Instance renames Generate_Data.Grammar (I); begin if Generate_Data.Action_Names (P.LHS) /= null or Generate_Data.Check_Names (P.LHS) /= null then Indent_Line ("Acts (" & Trimmed_Image (P.LHS) & ").Set_First_Last (0," & Integer'Image (P.RHSs.Last_Index) & ");"); for J in P.RHSs.First_Index .. P.RHSs.Last_Index loop if (Generate_Data.Action_Names (P.LHS) /= null and then Generate_Data.Action_Names (P.LHS)(J) /= null) or (Generate_Data.Check_Names (P.LHS) /= null and then Generate_Data.Check_Names (P.LHS) /= null) then Indent_Wrap ("Acts (" & Trimmed_Image (P.LHS) & ")(" & Trimmed_Image (J) & ") := (" & (if Generate_Data.Action_Names (P.LHS) = null then "null" elsif Generate_Data.Action_Names (P.LHS)(J) = null then "null" else Generate_Data.Action_Names (P.LHS)(J).all & "'Access") & ", " & (if Generate_Data.Check_Names (P.LHS) = null then "null" elsif Generate_Data.Check_Names (P.LHS)(J) = null then "null" else Generate_Data.Check_Names (P.LHS)(J).all & "'Access") & ");"); end if; end loop; end if; end; end loop; Indent := Indent - 3; Indent_Line ("end return;"); Indent := Indent - 3; Indent_Line ("end Actions;"); New_Line; end if; end Create_LR_Parser_Core_1; procedure Create_LR_Parser_Table (Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Generate_Data : in WisiToken.BNF.Generate_Utils.Generate_Data) is use all type Ada.Containers.Count_Type; use WisiToken.Parse.LR; use Ada.Strings.Unbounded; Table : WisiToken.Parse.LR.Parse_Table_Ptr renames Generate_Data.LR_Parse_Table; Lines_Per_Subr : constant := 1000; Subr_Count : Integer := 1; Last_Subr_Closed : Boolean := False; Line : Unbounded_String; procedure Append (Item : in String) is begin Line := Line & Item; end Append; begin -- Optimize source structure for GNAT compile time; one subroutine -- with thousands of "Table.States (*) := ..." takes forever to -- compile (apparently depending on available memory). But hundreds -- of subroutines, containing the same lines in chunks of 1000, -- compiles in acceptable time. Indent_Line ("declare"); Indent := Indent + 3; Indent_Line ("procedure Subr_" & Trimmed_Image (Subr_Count)); Indent_Line ("is begin"); Indent := Indent + 3; Line_Count := 0; Declare_Subroutines : for State_Index in Table.States'Range loop Actions : declare use Ada.Containers; Base_Indent : constant Ada.Text_IO.Count := Indent; begin Indent_Line ("Table.States (" & Trimmed_Image (State_Index) & ").Action_List.Set_Capacity (" & Trimmed_Image (Table.States (State_Index).Action_List.Length) & ");"); if Duplicate_Reduce (Table.States (State_Index)) then declare Node : Action_Node renames Table.States (State_Index).Action_List (1); Action : constant Reduce_Action_Rec := Node.Actions.Item; begin Set_Col (Indent); Line := +"Add_Action (Table.States (" & Trimmed_Image (State_Index) & "), " & Symbols_Image (Table.States (State_Index)) & ", " & Image (Action.Production) & "," & Count_Type'Image (Action.Token_Count) & ", "; Append ((if Generate_Data.Action_Names (Action.Production.LHS) = null then "null" elsif Generate_Data.Action_Names (Action.Production.LHS)(Action.Production.RHS) = null then "null" else Generate_Data.Action_Names (Action.Production.LHS)(Action.Production.RHS).all & "'Access")); Append (", "); Append ((if Generate_Data.Check_Names (Action.Production.LHS) = null then "null" elsif Generate_Data.Check_Names (Action.Production.LHS)(Action.Production.RHS) = null then "null" else Generate_Data.Check_Names (Action.Production.LHS)(Action.Production.RHS).all & "'Access")); Indent_Wrap (-Line & ");"); Line_Count := Line_Count + 1; Indent := Base_Indent; end; else for Node of Table.States (State_Index).Action_List loop Set_Col (Indent); declare Action_Node : Parse_Action_Node_Ptr := Node.Actions; begin case Action_Node.Item.Verb is when Shift => Line := +"Add_Action (Table.States (" & Trimmed_Image (State_Index) & "), " & Trimmed_Image (Node.Symbol); Append (", "); Append (Trimmed_Image (Action_Node.Item.State)); Append (");"); when Reduce | Accept_It => Line := +"Add_Action (Table.States (" & Trimmed_Image (State_Index) & "), " & Trimmed_Image (Node.Symbol); if Action_Node.Item.Verb = Reduce then Append (", Reduce"); else Append (", Accept_It"); end if; Append (", "); Append (Image (Action_Node.Item.Production) & ","); Append (Count_Type'Image (Action_Node.Item.Token_Count) & ", "); Append ((if Generate_Data.Action_Names (Action_Node.Item.Production.LHS) = null then "null" elsif Generate_Data.Action_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS) = null then "null" else Generate_Data.Action_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS).all & "'Access")); Append (", "); Append ((if Generate_Data.Check_Names (Action_Node.Item.Production.LHS) = null then "null" elsif Generate_Data.Check_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS) = null then "null" else Generate_Data.Check_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS).all & "'Access")); Append (");"); when Parse.LR.Error => raise SAL.Programmer_Error; end case; Indent_Wrap (-Line); Line_Count := Line_Count + 1; loop Action_Node := Action_Node.Next; exit when Action_Node = null; -- There is a conflict; must be Shift/{Reduce|Accept} or Reduce/{Reduce|Accept}. -- The added parameters are the same in either case. case Action_Node.Item.Verb is when Reduce | Accept_It => Line := +"Add_Conflict (Table.States (" & Trimmed_Image (State_Index) & "), " & Trimmed_Image (Node.Symbol) & ", "; Append (Image (Action_Node.Item.Production) & ","); Append (Count_Type'Image (Action_Node.Item.Token_Count) & ", "); Append ((if Generate_Data.Action_Names (Action_Node.Item.Production.LHS) = null then "null" elsif Generate_Data.Action_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS) = null then "null" else Generate_Data.Action_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS).all & "'Access")); Append (", "); Append ((if Generate_Data.Check_Names (Action_Node.Item.Production.LHS) = null then "null" elsif Generate_Data.Check_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS) = null then "null" else Generate_Data.Check_Names (Action_Node.Item.Production.LHS)(Action_Node.Item.Production.RHS).all & "'Access")); Indent_Wrap (-Line & ");"); Line_Count := Line_Count + 1; when others => raise SAL.Programmer_Error with "invalid conflict action verb: " & Parse.LR.Parse_Action_Verbs'Image (Action_Node.Item.Verb); end case; end loop; end; Indent := Base_Indent; end loop; end if; end Actions; if Table.States (State_Index).Goto_List.Length > 0 then Indent_Line ("Table.States (" & Trimmed_Image (State_Index) & ").Goto_List.Set_Capacity (" & Trimmed_Image (Table.States (State_Index).Goto_List.Length) & ");"); end if; Gotos : for Node of Table.States (State_Index).Goto_List loop Set_Col (Indent); Put ("Add_Goto (Table.States (" & Trimmed_Image (State_Index) & "), "); Put_Line (Trimmed_Image (Node.Symbol) & ", " & Trimmed_Image (Node.State) & ");"); Line_Count := Line_Count + 1; end loop Gotos; if Input_Data.Language_Params.Error_Recover then if Table.States (State_Index).Kernel.Length > 0 then Indent_Wrap ("Table.States (" & Trimmed_Image (State_Index) & ").Kernel := To_Vector (" & Image (Table.States (State_Index).Kernel, Strict => True) & ");"); end if; if Table.States (State_Index).Minimal_Complete_Actions.Length > 0 then Indent_Wrap ("Table.States (" & Trimmed_Image (State_Index) & ").Minimal_Complete_Actions := To_Vector (" & Strict_Image (Table.States (State_Index).Minimal_Complete_Actions, Strict => True) & ");"); if Table.States (State_Index).Minimal_Complete_Actions_Recursive then Indent_Wrap ("Table.States (" & Trimmed_Image (State_Index) & ").Minimal_Complete_Actions_Recursive := True;"); end if; end if; end if; if Line_Count > Lines_Per_Subr then Line_Count := 0; Indent := Indent - 3; Indent_Line ("end Subr_" & Trimmed_Image (Subr_Count) & ";"); if State_Index < Table.States'Last then Subr_Count := Subr_Count + 1; Last_Subr_Closed := False; Indent_Line ("procedure Subr_" & Trimmed_Image (Subr_Count)); Indent_Line ("is begin"); Indent := Indent + 3; else Last_Subr_Closed := True; end if; end if; end loop Declare_Subroutines; if not Last_Subr_Closed then Indent := Indent - 3; Indent_Line ("end Subr_" & Trimmed_Image (Subr_Count) & ";"); end if; Indent := Indent - 3; Indent_Line ("begin"); Indent := Indent + 3; for Subr in 1 .. Subr_Count loop Indent_Line ("Subr_" & Trimmed_Image (Subr) & ";"); end loop; Indent_Line ("Table.Error_Action := new Parse_Action_Node'((Verb => Error), null);"); Indent := Indent - 3; Indent_Line ("end;"); end Create_LR_Parser_Table; procedure LR_Create_Create_Parser (Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Common_Data : in out Output_Ada_Common.Common_Data; Generate_Data : aliased in WisiToken.BNF.Generate_Utils.Generate_Data) is Table : WisiToken.Parse.LR.Parse_Table_Ptr renames Generate_Data.LR_Parse_Table; begin Indent_Line ("procedure Create_Parser"); case Common_Data.Interface_Kind is when Process => if Input_Data.Language_Params.Error_Recover then Indent_Line (" (Parser : out WisiToken.Parse.LR.Parser.Parser;"); Indent_Line (" Language_Fixes : in WisiToken.Parse.LR.Parser.Language_Fixes_Access;"); Indent_Line (" Language_Matching_Begin_Tokens : in " & "WisiToken.Parse.LR.Parser.Language_Matching_Begin_Tokens_Access;"); Indent_Line (" Language_String_ID_Set : in WisiToken.Parse.LR.Parser.Language_String_ID_Set_Access;"); else Indent_Line (" (Parser : out WisiToken.Parse.LR.Parser_No_Recover.Parser;"); end if; Indent_Line (" Trace : not null access WisiToken.Trace'Class;"); Indent_Start (" User_Data : in WisiToken.Syntax_Trees.User_Data_Access"); when Module => Indent_Line (" (Parser : out WisiToken.Parse.LR.Parser.Parser;"); Indent_Line (" Env : in Emacs_Env_Access;"); Indent_Start (" Lexer_Elisp_Symbols : in Lexers.Elisp_Array_Emacs_Value"); end case; if Common_Data.Text_Rep then Put_Line (";"); Indent_Line (" Text_Rep_File_Name : in String)"); else Put_Line (")"); end if; Indent_Line ("is"); Indent := Indent + 3; Indent_Line ("use WisiToken.Parse.LR;"); if Common_Data.Text_Rep then Create_LR_Parser_Core_1 (Common_Data, Generate_Data); Indent_Line ("Table : constant Parse_Table_Ptr := Get_Text_Rep"); Indent_Line (" (Text_Rep_File_Name, McKenzie_Param, Actions);"); Indent := Indent - 3; Indent_Line ("begin"); Indent := Indent + 3; else if Input_Data.Language_Params.Error_Recover then Create_LR_Parser_Core_1 (Common_Data, Generate_Data); end if; Indent_Line ("Table : constant Parse_Table_Ptr := new Parse_Table"); Indent_Line (" (State_First => 0,"); Indent := Indent + 3; Indent_Line ("State_Last =>" & State_Index'Image (Table.State_Last) & ","); Indent_Line ("First_Terminal =>" & Token_ID'Image (Table.First_Terminal) & ","); Indent_Line ("Last_Terminal =>" & Token_ID'Image (Table.Last_Terminal) & ","); Indent_Line ("First_Nonterminal =>" & Token_ID'Image (Table.First_Nonterminal) & ","); Indent_Line ("Last_Nonterminal =>" & Token_ID'Image (Table.Last_Nonterminal) & ");"); Indent := Indent - 3; Indent := Indent - 3; Indent_Line ("begin"); Indent := Indent + 3; if Input_Data.Language_Params.Error_Recover then Indent_Line ("Table.McKenzie_Param := McKenzie_Param;"); end if; Create_LR_Parser_Table (Input_Data, Generate_Data); New_Line; end if; if Input_Data.Language_Params.Error_Recover then Indent_Line ("WisiToken.Parse.LR.Parser.New_Parser"); else Indent_Line ("WisiToken.Parse.LR.Parser_No_Recover.New_Parser"); end if; Indent_Line (" (Parser,"); case Common_Data.Interface_Kind is when Process => Indent_Line (" Trace,"); Indent_Line (" Lexer.New_Lexer (Trace.Descriptor),"); Indent_Line (" Table,"); if Input_Data.Language_Params.Error_Recover then Indent_Line (" Language_Fixes,"); Indent_Line (" Language_Matching_Begin_Tokens,"); Indent_Line (" Language_String_ID_Set,"); end if; Indent_Line (" User_Data,"); Indent_Line (" Max_Parallel => 15,"); Indent_Line (" Terminate_Same_State => True);"); when Module => Indent_Line (" Lexer.New_Lexer (Env, Lexer_Elisp_Symbols),"); Indent_Line (" Table, Max_Parallel => 15, Terminate_Same_State => True);"); end case; Indent := Indent - 3; Indent_Line ("end Create_Parser;"); end LR_Create_Create_Parser; procedure Packrat_Create_Create_Parser (Common_Data : in out Output_Ada_Common.Common_Data; Generate_Data : aliased in WisiToken.BNF.Generate_Utils.Generate_Data; Packrat_Data : in WisiToken.Generate.Packrat.Data) is use Ada.Strings.Unbounded; Text : Unbounded_String; Need_Bar : Boolean := True; begin Indent_Line ("function Create_Parser"); Indent_Line (" (Trace : not null access WisiToken.Trace'Class;"); Indent_Line (" User_Data : in WisiToken.Syntax_Trees.User_Data_Access)"); Indent_Line (" return WisiToken.Parse.Base_Parser'Class"); case Packrat_Generate_Algorithm'(Common_Data.Generate_Algorithm) is when Packrat_Gen => Indent_Line ("is begin"); Indent := Indent + 3; Indent_Line ("return Parser : WisiToken.Parse.Packrat.Generated.Parser do"); Indent := Indent + 3; Indent_Line ("Parser.Trace := Trace;"); Indent_Line ("Parser.Lexer := Lexer.New_Lexer (Trace.Descriptor);"); Indent_Line ("Parser.User_Data := User_Data;"); Indent_Line ("Parser.Parse_WisiToken_Accept := Parse_wisitoken_accept_1'Access;"); Indent := Indent - 3; Indent_Line ("end return;"); when Packrat_Proc => Indent_Line ("is"); Indent := Indent + 3; Indent_Line ("use WisiToken;"); Indent_Line ("use WisiToken.Productions;"); Indent_Line ("Grammar : Prod_Arrays.Vector;"); Indent_Line ("Direct_Left_Recursive : constant WisiToken.Token_ID_Set (" & Trimmed_Image (Generate_Data.Grammar.First_Index) & " .. " & Trimmed_Image (Generate_Data.Grammar.Last_Index) & ") :="); Need_Bar := False; if Any (Packrat_Data.Direct_Left_Recursive) then for I in Packrat_Data.Direct_Left_Recursive'Range loop if Packrat_Data.Direct_Left_Recursive (I) then if Need_Bar then Text := Text & " | "; else Need_Bar := True; end if; Text := Text & Trimmed_Image (I); end if; end loop; Indent_Start (" ("); Indent := Indent + 3; Indent_Wrap (-Text & " => True,"); Indent_Line ("others => False);"); Indent := Indent - 3; else Indent_Line (" (others => False);"); end if; Indent := Indent - 3; Indent_Line ("begin"); Indent := Indent + 3; WisiToken.BNF.Generate_Grammar (Generate_Data.Grammar, Generate_Data.Action_Names.all); Indent_Line ("return WisiToken.Parse.Packrat.Procedural.Create"); Indent_Line (" (Grammar, Direct_Left_Recursive, " & Trimmed_Image (Generate_Data.Descriptor.Accept_ID) & ", Trace, Lexer.New_Lexer (Trace.Descriptor), User_Data);"); end case; Indent := Indent - 3; Indent_Line ("end Create_Parser;"); New_Line; end Packrat_Create_Create_Parser; procedure External_Create_Create_Grammar (Generate_Data : in WisiToken.BNF.Generate_Utils.Generate_Data) is begin Indent_Line ("function Create_Grammar return WisiToken.Productions.Prod_Arrays.Vector"); Indent_Line ("is"); Indent_Line (" use WisiToken;"); Indent_Line (" use WisiToken.Productions;"); Indent_Line ("begin"); Indent := Indent + 3; Indent_Line ("return Grammar : WisiToken.Productions.Prod_Arrays.Vector do"); Indent := Indent + 3; WisiToken.BNF.Generate_Grammar (Generate_Data.Grammar, Generate_Data.Action_Names.all); Indent := Indent - 3; Indent_Line ("end return;"); Indent := Indent - 3; Indent_Line ("end Create_Grammar;"); end External_Create_Create_Grammar; procedure Create_re2c (Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Tuple : in Generate_Tuple; Generate_Data : aliased in WisiToken.BNF.Generate_Utils.Generate_Data; Output_File_Name_Root : in String) is use Ada.Strings.Fixed; use Generate_Utils; use WisiToken.BNF.Utils; File : File_Type; begin Create (File, Out_File, Output_File_Name_Root & ".re2c"); Set_Output (File); Indent := 1; Put_File_Header (C_Comment, " -*- mode: C -*-", Use_Tuple => True, Tuple => Tuple); Put_Raw_Code (C_Comment, Input_Data.Raw_Code (Copyright_License)); New_Line; Indent_Line ("#include <stddef.h>"); -- size_t Indent_Line ("#include <stdio.h>"); -- printf Indent_Line ("#include <stdlib.h>"); -- malloc New_Line; Indent_Line ("typedef struct wisi_lexer"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("unsigned char* buffer; // input text, in utf-8 encoding"); Indent_Line ("unsigned char* buffer_last; // last byte in buffer"); Indent_Line ("unsigned char* cursor; // current byte"); Indent_Line ("unsigned char* byte_token_start; // byte position at start of current token"); Indent_Line ("size_t char_pos; // character position of current character"); Indent_Line ("size_t char_token_start; // character position at start of current token"); Indent_Line ("int line; // 1 indexed"); Indent_Line ("int line_token_start; // line at start of current token"); Indent_Line ("unsigned char* marker; // saved cursor"); Indent_Line ("size_t marker_pos; // saved character position"); Indent_Line ("size_t marker_line; // saved line"); Indent_Line ("unsigned char* context; // saved cursor"); Indent_Line ("size_t context_pos; // saved character position"); Indent_Line ("int context_line; // saved line"); Indent_Line ("int verbosity;"); New_Line; Indent := Indent - 3; Indent_Line ("} wisi_lexer;"); New_Line; Indent_Line ("#define YYCTYPE unsigned char"); New_Line; -- Status values: Indent_Line ("#define NO_ERROR 0"); Indent_Line ("#define ERROR_unrecognized_character 1"); ---------- -- new_lexer, free_lexer, reset_lexer -- It's normal to increment lexer->cursor one past the end of input, -- but not to read that character. To support memory mapped files, we -- enforce this strictly; YYPEEK returns EOT (end of text) when -- reading past end of buffer; that's how we recognize the end of -- text token. Indent_Line ("wisi_lexer* " & Output_File_Name_Root & "_new_lexer"); Indent_Line (" (unsigned char* input, size_t length, int verbosity)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("wisi_lexer* result = malloc (sizeof (wisi_lexer));"); Indent_Line ("result->buffer = input;"); Indent_Line ("result->buffer_last = input + length - 1;"); Indent_Line ("result->cursor = input;"); Indent_Line ("result->byte_token_start = input;"); Indent_Line ("result->char_pos = 1; /* match WisiToken.Buffer_Region */"); Indent_Line ("result->char_token_start = 1;"); Indent_Line ("result->line = (*result->cursor == 0x0A) ? 2 : 1;"); Indent_Line ("result->line_token_start = result->line;"); Indent_Line ("result->verbosity = verbosity;"); Indent_Line ("return result;"); Indent := Indent - 3; Indent_Line ("}"); New_Line; Indent_Line ("void"); Indent_Line (Output_File_Name_Root & "_free_lexer(wisi_lexer** lexer)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("free(*lexer);"); Indent_Line ("*lexer = 0;"); Indent := Indent - 3; Indent_Line ("}"); New_Line; Indent_Line ("void"); Indent_Line (Output_File_Name_Root & "_reset_lexer(wisi_lexer* lexer)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("lexer->cursor = lexer->buffer;"); Indent_Line ("lexer->char_pos = 1;"); Indent_Line ("lexer->line = (*lexer->cursor == 0x0A) ? 2 : 1;"); Indent := Indent - 3; Indent_Line ("}"); New_Line; ---------- -- next_token utils Indent_Line ("static void debug(wisi_lexer* lexer, int state, unsigned char ch)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("if (lexer->verbosity > 0)"); Indent_Line (" {"); Indent_Line (" if (ch < ' ')"); Indent_Line (" printf (""lexer: %d, 0x%x\n"", state, ch);"); Indent_Line (" else"); Indent_Line (" printf (""lexer: %d, '%c' 0x%x\n"", state, ch, ch);"); Indent_Line (" }"); Indent := Indent - 3; Indent_Line ("}"); Indent_Line ("#define YYDEBUG(state, ch) debug(lexer, state, ch)"); -- YYCURSOR is only used in calls of YYDEBUG; we can't define it as -- YYPEEK because it is used as '*YYCURSOR'. Indent_Line ("#define YYCURSOR lexer->cursor"); New_Line; Indent_Line ("#define YYPEEK() (lexer->cursor <= lexer->buffer_last) ? *lexer->cursor : 4"); New_Line; Indent_Line ("static void skip(wisi_lexer* lexer)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("if (lexer->cursor <= lexer->buffer_last)"); Indent_Line (" ++lexer->cursor;"); Indent_Line ("if (lexer->cursor <= lexer->buffer_last)"); Indent_Line ("{"); Indent_Line (" /* UFT-8 encoding: https://en.wikipedia.org/wiki/UTF-8#Description */"); Indent_Line (" if (*lexer->cursor == 0x0A && lexer->cursor > lexer->buffer && *(lexer->cursor - 1) == 0x0D)"); Indent_Line (" {/* second byte of DOS line ending */"); Indent_Line (" }"); Indent_Line (" else if ((*lexer->cursor & 0x80) == 0x80 && (*lexer->cursor & 0xC0) != 0xC0)"); Indent_Line (" {/* byte 2, 3 or 4 of multi-byte UTF-8 char */"); Indent_Line (" }"); Indent_Line (" else"); Indent_Line (" ++lexer->char_pos;"); Indent_Line (" if (*lexer->cursor == 0x0A) ++lexer->line;"); Indent_Line ("}"); Indent := Indent - 3; Indent_Line ("}"); Indent_Start ("#define YYSKIP() skip(lexer)"); New_Line; Indent_Line ("#define YYBACKUP() lexer->marker = lexer->cursor; lexer->marker_pos = lexer->char_pos;" & "lexer->marker_line = lexer->line"); Indent_Line ("#define YYRESTORE() lexer->cursor = lexer->marker; lexer->char_pos = lexer->marker_pos;" & "lexer->line = lexer->marker_line"); Indent_Line ("#define YYBACKUPCTX() lexer->context = lexer->cursor; lexer->context_pos = lexer->char_pos;" & "lexer->context_line = lexer->line"); Indent_Line ("#define YYRESTORECTX() lexer->cursor = lexer->context; lexer->char_pos = lexer->context_pos;" & "lexer->line = lexer->context_line"); New_Line; if Is_In (Input_Data.Tokens.Tokens, "delimited-text") then Indent_Line ("static void skip_to(wisi_lexer* lexer, char* target)"); Indent_Line ("{"); Indent_Line (" int i;"); New_Line; Indent_Line (" while (lexer->cursor <= lexer->buffer_last)"); Indent_Line (" {"); Indent_Line (" if (*lexer->cursor == target[0])"); Indent_Line (" {"); Indent_Line (" i = 0;"); Indent_Line (" do"); Indent_Line (" i++;"); Indent_Line (" while (0 != target[i] &&"); Indent_Line (" lexer->cursor + i <= lexer->buffer_last &&"); Indent_Line (" *(lexer->cursor + i) == target[i]);"); New_Line; Indent_Line (" if (0 == target[i])"); Indent_Line (" {"); Indent_Line (" for (i = 0; 0 != target[i]; i++)"); Indent_Line (" skip(lexer);"); Indent_Line (" break;"); Indent_Line (" }"); Indent_Line (" }"); Indent_Line (" skip(lexer);"); Indent_Line (" };"); Indent_Line ("}"); New_Line; end if; ---------- -- next_token Indent_Line ("int " & Output_File_Name_Root & "_next_token"); Indent_Line (" (wisi_lexer* lexer,"); Indent_Line (" int* id,"); Indent_Line (" size_t* byte_position,"); Indent_Line (" size_t* byte_length,"); Indent_Line (" size_t* char_position,"); Indent_Line (" size_t* char_length,"); Indent_Line (" int* line_start)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("int status = NO_ERROR;"); Indent_Line ("*id = -1;"); -- Token_ID'First = 0; see dragon_4_43.wy Indent_Line ("if (lexer->cursor > lexer->buffer_last)"); Indent_Line ("{"); Indent := Indent + 3; Indent_Line ("*id =" & WisiToken.Token_ID'Image (Generate_Data.Descriptor.EOI_ID) & ";"); Indent_Line ("*byte_position = lexer->buffer_last - lexer->buffer + 1;"); Indent_Line ("*byte_length = 0;"); Indent_Line ("*char_position = lexer->char_token_start;"); Indent_Line ("*char_length = 0;"); Indent_Line ("*line_start = lexer->line;"); Indent_Line ("return status;"); Indent := Indent - 3; Indent_Line ("}"); New_Line; Indent_Line ("lexer->byte_token_start = lexer->cursor;"); Indent_Line ("lexer->char_token_start = lexer->char_pos;"); Indent_Line ("if (*lexer->cursor == 0x0A)"); Indent_Line (" lexer->line_token_start = lexer->line-1;"); Indent_Line ("else"); Indent_Line (" lexer->line_token_start = lexer->line;"); New_Line; Indent_Line ("while (*id == -1 && status == 0)"); Indent_Line ("{"); Indent := Indent + 3; Put_Line ("/*!re2c"); Indent_Line ("re2c:yyfill:enable = 0;"); New_Line; -- Regexps used in definitions for Pair of Input_Data.Tokens.re2c_Regexps loop Indent_Line (-Pair.Name & " = " & (-Pair.Value) & ";"); end loop; New_Line; -- definitions for I in All_Tokens (Generate_Data).Iterate (Non_Grammar => True, Nonterminals => False) loop if 0 /= Index (Source => Value (I), Pattern => "/") then -- trailing context syntax; forbidden in definitions null; elsif Kind (I) = "EOI" then Indent_Line (Name (I) & " = [\x04];"); elsif Kind (I) = "delimited-text" then -- not declared in definitions null; elsif Kind (I) = "keyword" and Input_Data.Language_Params.Case_Insensitive then Indent_Line (Name (I) & " = '" & Strip_Quotes (Value (I)) & "';"); else -- Other kinds have values that are regular expressions, in re2c syntax Indent_Line (Name (I) & " = " & Value (I) & ";"); end if; end loop; New_Line; -- lexer rules for I in All_Tokens (Generate_Data).Iterate (Non_Grammar => True, Nonterminals => False) loop declare Val : constant String := Value (I); begin if Kind (I) = "non-reporting" then Indent_Line (Name (I) & " { lexer->byte_token_start = lexer->cursor;"); Indent_Line (" lexer->char_token_start = lexer->char_pos;"); Indent_Line (" if (*lexer->cursor == 0x0A)"); Indent_Line (" lexer->line_token_start = lexer->line-1;"); Indent_Line (" else"); Indent_Line (" lexer->line_token_start = lexer->line;"); Indent_Line (" continue; }"); elsif Kind (I) = "delimited-text" then Indent_Line (Val & " {*id = " & WisiToken.Token_ID'Image (ID (I)) & "; skip_to(lexer, " & Repair_Image (I) & "); continue;}"); elsif 0 /= Index (Source => Val, Pattern => "/") then Indent_Line (Val & " {*id = " & WisiToken.Token_ID'Image (ID (I)) & "; continue;}"); else Indent_Line (Name (I) & " {*id = " & WisiToken.Token_ID'Image (ID (I)) & "; continue;}"); end if; end; end loop; New_Line; -- Default action. Indent_Line ("* {status = ERROR_unrecognized_character; continue;}"); Put_Line ("*/"); Indent := Indent - 3; Indent_Line ("}"); Indent_Line ("/* lexer->cursor and lexer ->char_pos are one char past end of token */"); Indent_Line ("*byte_position = lexer->byte_token_start - lexer->buffer + 1;"); Indent_Line ("*byte_length = lexer->cursor - lexer->byte_token_start;"); Indent_Line ("*char_position = lexer->char_token_start;"); Indent_Line ("*char_length = lexer->char_pos - lexer->char_token_start;"); Indent_Line ("*line_start = lexer->line_token_start;"); Indent_Line ("return status;"); Indent_Line ("}"); Indent := Indent - 3; Set_Output (Standard_Output); Close (File); declare Ada_Name : constant String := Output_File_Name_Root & "_re2c_c"; -- Output_File_Name_Root is the file name of the grammar file - -- assume it is a legal Ada name. begin Create (File, Out_File, Output_File_Name_Root & "_re2c_c.ads"); Set_Output (File); Indent := 1; Put_File_Header (Ada_Comment, Use_Tuple => True, Tuple => Tuple); Put_Raw_Code (Ada_Comment, Input_Data.Raw_Code (Copyright_License)); New_Line; Put_Line ("with Interfaces.C;"); Put_Line ("with WisiToken;"); Put_Line ("with System;"); Put_Line ("package " & Ada_Name & " is"); Indent := Indent + 3; New_Line; Indent_Line ("function New_Lexer"); Indent_Line (" (Buffer : in System.Address;"); Indent_Line (" Length : in Interfaces.C.size_t;"); Indent_Line (" Verbosity : in Interfaces.C.int)"); Indent_Line (" return System.Address"); Indent_Line ("with Import => True,"); Indent_Line (" Convention => C,"); Indent_Line (" External_Name => """ & Output_File_Name_Root & "_new_lexer"";"); Indent_Line ("-- Create the lexer object, passing it the full text to process."); New_Line; Indent_Line ("procedure Free_Lexer (Lexer : in out System.Address)"); Indent_Line ("with Import => True,"); Indent_Line (" Convention => C,"); Indent_Line (" External_Name => """ & Output_File_Name_Root & "_free_lexer"";"); Indent_Line ("-- Free the lexer object"); New_Line; Indent_Line ("procedure Reset_Lexer (Lexer : in System.Address)"); Indent_Line ("with Import => True,"); Indent_Line (" Convention => C,"); Indent_Line (" External_Name => """ & Output_File_Name_Root & "_reset_lexer"";"); New_Line; Indent_Line ("function Next_Token"); Indent_Line (" (Lexer : in System.Address;"); Indent_Line (" ID : out WisiToken.Token_ID;"); Indent_Line (" Byte_Position : out Interfaces.C.size_t;"); Indent_Line (" Byte_Length : out Interfaces.C.size_t;"); Indent_Line (" Char_Position : out Interfaces.C.size_t;"); Indent_Line (" Char_Length : out Interfaces.C.size_t;"); Indent_Line (" Line_Start : out Interfaces.C.int)"); Indent_Line (" return Interfaces.C.int"); Indent_Line ("with Import => True,"); Indent_Line (" Convention => C,"); Indent_Line (" External_Name => """ & Output_File_Name_Root & "_next_token"";"); New_Line; Indent := Indent - 3; Put_Line ("end " & Ada_Name & ";"); Set_Output (Standard_Output); Close (File); end; end Create_re2c; function File_Name_To_Ada (File_Name : in String) return String is Result : String := File_Name; begin Result (Result'First) := To_Upper (Result (Result'First)); for I in Result'Range loop if Result (I) = '-' then Result (I) := '.'; Result (I + 1) := To_Upper (Result (I + 1)); elsif Result (I) = '_' then Result (I + 1) := To_Upper (Result (I + 1)); end if; end loop; return Result; end File_Name_To_Ada; function Initialize (Input_Data : in WisiToken_Grammar_Runtime.User_Data_Type; Tuple : in Generate_Tuple; Output_File_Root : in String; Check_Interface : in Boolean) return Common_Data is begin return Data : Common_Data do Data.Generate_Algorithm := Tuple.Gen_Alg; Data.Output_Language := Ada_Output_Language (Tuple.Out_Lang); if Tuple.Gen_Alg = External or else Input_Data.User_Lexer in Valid_Lexer then Data.Lexer := Input_Data.User_Lexer; else raise SAL.Programmer_Error with "tuple.alg " & Generate_Algorithm'Image (Tuple.Gen_Alg) & " input_data.user_lexer " & Lexer_Image (Input_Data.User_Lexer).all; end if; if Check_Interface then if Tuple.Interface_Kind in Valid_Interface then Data.Interface_Kind := Valid_Interface (Tuple.Interface_Kind); else Put_Error (Error_Message (Input_Data.Grammar_Lexer.File_Name, 1, "Interface_Kind not set")); end if; else Data.Interface_Kind := Process; end if; Data.Text_Rep := Tuple.Text_Rep; Data.Lower_File_Name_Root := +To_Lower (Output_File_Root); end return; end Initialize; function To_Token_Ada_Name (WY_Name : in String) return String is -- Convert WY_Name to a valid Ada identifier: -- -- Add "_ID" to avoid collision with Ada reserved words -- -- Replace '-' with '_' Image : String := WY_Name; begin for I in Image'Range loop if Image (I) = '-' then Image (I) := '_'; end if; end loop; return Image & "_ID"; end To_Token_Ada_Name; end WisiToken.BNF.Output_Ada_Common;
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.tasks_shared; package ewok.syscalls.init with spark_mode => off is procedure svc_register_device (caller_id : in ewok.tasks_shared.t_task_id; params : in t_parameters; mode : in ewok.tasks_shared.t_task_mode); procedure svc_init_done (caller_id : in ewok.tasks_shared.t_task_id; mode : in ewok.tasks_shared.t_task_mode); procedure svc_get_taskid (caller_id : in ewok.tasks_shared.t_task_id; params : in t_parameters; mode : in ewok.tasks_shared.t_task_mode); end ewok.syscalls.init;
with STM32_SVD; use STM32_SVD; with STM32_SVD.RCC; use STM32_SVD.RCC; with STM32_SVD.GPIO; use STM32_SVD.GPIO; with STM32GD.Startup; with STM32GD.Vectors; package body STM32GD.Board is procedure Enable_Peripherals is begin RCC_Periph.IOPENR.IOPAEN := 1; RCC_Periph.IOPENR.IOPBEN := 1; RCC_Periph.APB1ENR.USART2EN := 1; RCC_Periph.APB2ENR.SPI1EN := 1; RCC_Periph.APB1ENR.I2C1EN := 1; RCC_Periph.APB2ENR.ADCEN := 1; CSN.Init; CSN.Set; SCLK.Init; MISO.Init; MOSI.Init; IRQ.Init; TX.Init; RX.Init; SCL.Init; SDA.Init; LED.Init; USART.Init; I2C.Init; SPI.Init; end Enable_Peripherals; procedure Disable_Peripherals is begin RCC_Periph.IOPENR := ( Reserved_5_6 => 0, Reserved_8_31 => 0, others => 1); GPIOA_Periph.MODER.Val := 16#FFFF_FFFF#; GPIOB_Periph.MODER.Val := 16#FFFF_FFFF#; GPIOC_Periph.MODER.Val := 16#FFFF_FFFF#; GPIOD_Periph.MODER.Val := 16#FFFF_FFFF#; GPIOE_Periph.MODER.Val := 16#FFFF_FFFF#; GPIOH_Periph.MODER.Val := 16#FFFF_FFFF#; MOSI.Set_Mode (STM32GD.GPIO.Mode_In); MOSI.Set_Pull_Resistor (STM32GD.GPIO.Pull_Down); MISO.Set_Mode (STM32GD.GPIO.Mode_In); MISO.Set_Pull_Resistor (STM32GD.GPIO.Pull_Down); SCLK.Set_Mode (STM32GD.GPIO.Mode_In); SCLK.Set_Pull_Resistor (STM32GD.GPIO.Pull_Up); CSN.Set_Mode (STM32GD.GPIO.Mode_In); CSN.Set_Pull_Resistor (STM32GD.GPIO.Pull_Up); RCC_Periph.IOPENR := ( Reserved_5_6 => 0, Reserved_8_31 => 0, others => 0); RCC_Periph.APB1ENR.USART2EN := 0; RCC_Periph.APB2ENR.SPI1EN := 0; RCC_Periph.APB1ENR.I2C1EN := 0; RCC_Periph.APB2ENR.ADCEN := 0; end Disable_Peripherals; procedure Init is begin CLOCKS.Init; RTC.Init; Enable_Peripherals; STM32GD.Clear_Event; end Init; end STM32GD.Board;
with Ada.Integer_Text_IO, Generic_Perm; procedure Topswaps is function Topswaps(Size: Positive) return Natural is package Perms is new Generic_Perm(Size); P: Perms.Permutation; Done: Boolean; Max: Natural; function Swapper_Calls(P: Perms.Permutation) return Natural is Q: Perms.Permutation := P; I: Perms.Element := P(1); begin if I = 1 then return 0; else for Idx in 1 .. I loop Q(Idx) := P(I-Idx+1); end loop; return 1 + Swapper_Calls(Q); end if; end Swapper_Calls; begin Perms.Set_To_First(P, Done); Max:= Swapper_Calls(P); while not Done loop Perms.Go_To_Next(P, Done); Max := natural'Max(Max, Swapper_Calls(P)); end loop; return Max; end Topswaps; begin for I in 1 .. 10 loop Ada.Integer_Text_IO.Put(Item => Topswaps(I), Width => 3); end loop; end Topswaps;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . I N T E R R U P T S . N A M E S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1991-2017, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. -- -- Extensive contributions were provided by Ada Core Technologies, Inc. -- -- -- ------------------------------------------------------------------------------ -- This is the version for LEON targets of this package with System; package Ada.Interrupts.Names is -- All identifiers in this unit are implementation defined pragma Implementation_Defined; ------------------------- -- External Interrupts -- ------------------------- External_Interrupt_3 : constant Interrupt_ID := 7; External_Interrupt_3_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 6; External_Interrupt_2 : constant Interrupt_ID := 6; External_Interrupt_2_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 5; External_Interrupt_1 : constant Interrupt_ID := 5; External_Interrupt_1_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 4; External_Interrupt_0 : constant Interrupt_ID := 4; External_Interrupt_0_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 3; ---------------------- -- Timer Interrupts -- ---------------------- Real_Time_Clock : constant Interrupt_ID := 9; Real_Time_Clock_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 8; General_Purpose_Timer : constant Interrupt_ID := 8; General_Purpose_Timer_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 7; --------------------- -- UART Interrupts -- --------------------- UART_1_RX_TX : constant Interrupt_ID := 3; UART_1_RX_TX_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 2; UART_2_RX_TX : constant Interrupt_ID := 2; UART_2_RX_TX_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 1; ----------------------- -- Unused Interrupts -- ----------------------- Unused_Interrupt_10 : constant Interrupt_ID := 10; Unused_Interrupt_10_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 9; Unused_Interrupt_12 : constant Interrupt_ID := 12; Unused_Interrupt_12_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 11; Unused_Interrupt_13 : constant Interrupt_ID := 13; Unused_Interrupt_13_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 12; ----------------------------- -- Miscelaneous Interrupts -- ----------------------------- Internal_Bus_Error : constant Interrupt_ID := 1; Internal_Bus_Error_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First; DSU : constant Interrupt_ID := 11; DSU_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 10; PCI : constant Interrupt_ID := 14; PCI_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 13; EDAC_Interrupt : constant Interrupt_ID := 15; EDAC_Priority : constant System.Interrupt_Priority := System.Interrupt_Priority'First + 14; end Ada.Interrupts.Names;
package Pig is type Dice_Score is range 1 .. 6; type Player is tagged private; function Recent(P: Player) return Natural; function All_Recent(P: Player) return Natural; function Score(P: Player) return Natural; type Actor is abstract tagged null record; function Roll_More(A: Actor; Self, Opponent: Player'Class) return Boolean is abstract; procedure Play(First, Second: Actor'Class; First_Wins: out Boolean); private type Player is tagged record Score: Natural := 0; All_Recent: Natural := 0; Recent_Roll: Dice_Score := 1; end record; end Pig;
-- This spec has been automatically generated from cm4f.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package Cortex_M_SVD.SCB is pragma Preelaborate; --------------- -- Registers -- --------------- -- Disables Interruption Folding type ACTLR_DISFOLD_Field is ( -- Interruption folding enabled Normal, -- Interruption folding disabled Disable) with Size => 1; for ACTLR_DISFOLD_Field use (Normal => 0, Disable => 1); -- Disabled FPU exception outputs type ACTLR_PFEXCODIS_Field is ( -- Normal operation. Normal, -- FPU exception outputs are disabled. Disable) with Size => 1; for ACTLR_PFEXCODIS_Field use (Normal => 0, Disable => 1); -- Disables dynamic read allocate mode for Write-Back Write-Allocate memory -- regions: type ACTLR_DISRAMODE_Field is ( -- Normal operation. Normal, -- Dynamic disabled. Disable) with Size => 1; for ACTLR_DISRAMODE_Field use (Normal => 0, Disable => 1); -- Disables ITM and DWT ATB flush: type ACTLR_DISITMATBFLUSH_Field is ( -- Reset value for the field Actlr_Disitmatbflush_Field_Reset, -- ITM and DWT ATB flush disabled. AFVALID is ignored and AFREADY is -- held HIGH. Disable) with Size => 1; for ACTLR_DISITMATBFLUSH_Field use (Actlr_Disitmatbflush_Field_Reset => 0, Disable => 1); -- Disables the Branch Target Address Cache (BTAC): type ACTLR_DISBTACREAD_Field is ( -- Normal operation. Normal, -- BTAC is not used and only static branch prediction can occur. Disable) with Size => 1; for ACTLR_DISBTACREAD_Field use (Normal => 0, Disable => 1); -- Disables the Branch Target Address Cache allocation: type ACTLR_DISBTACALLOC_Field is ( -- Normal operation. Normal, -- No new entries are allocated in BTAC, but existing entries can be -- updated. Disable) with Size => 1; for ACTLR_DISBTACALLOC_Field use (Normal => 0, Disable => 1); -- Disables critical AXI Read-Under-Read: type ACTLR_DISCRITAXIRUR_Field is ( -- Normal operation. Normal, -- An AXI read to Strongly-ordered or device memory, or an LDREX to -- shared memory, is not put on AXI if there are any outstanding reads -- on AXI. Transactions on AXI cannot be interrupted. This bit might -- reduce the time that these transactions are in progress and might -- improve worst case interrupt latency. Performance is decreased when -- this bit is set. Disable) with Size => 1; for ACTLR_DISCRITAXIRUR_Field use (Normal => 0, Disable => 1); -- Disables dual-issued direct branches: type ACTLR_DISDI_DB_Field is ( -- Normal operation. Normal, -- Direct branches instruction type cannot be dual-issued in channel 0 Disable) with Size => 1; for ACTLR_DISDI_DB_Field use (Normal => 0, Disable => 1); -- Disables dual-issued indirect branches: type ACTLR_DISDI_IB_Field is ( -- Normal operation. Normal, -- Indirect branches, but not loads to PC instruction type cannot be -- dual-issued in channel 0 Disable) with Size => 1; for ACTLR_DISDI_IB_Field use (Normal => 0, Disable => 1); -- Disables dual-issued loads to PC: type ACTLR_DISDI_LPC_Field is ( -- Normal operation. Normal, -- Loads to PC instruction type cannot be dual-issued in channel 0 Disable) with Size => 1; for ACTLR_DISDI_LPC_Field use (Normal => 0, Disable => 1); -- Disables integer MAC and MUL dual-issued instructions: type ACTLR_DISDI_MAC_MUL_Field is ( -- Normal operation. Normal, -- Integer MAC and MUL instruction type cannot be dual-issued in channel -- 0 Disable) with Size => 1; for ACTLR_DISDI_MAC_MUL_Field use (Normal => 0, Disable => 1); -- Disables VFP dual-issued instruction: type ACTLR_DISDI_VFP_Field is ( -- Normal operation. Normal, -- VFP instruction type cannot be dual-issued in channel 0 Disable) with Size => 1; for ACTLR_DISDI_VFP_Field use (Normal => 0, Disable => 1); -- Disables direct branches instructions in channel 1: type ACTLR_DISISSCH1_DB_Field is ( -- Normal operation. Normal, -- Direct branches instruction type cannot be issued in channel 1 Disable) with Size => 1; for ACTLR_DISISSCH1_DB_Field use (Normal => 0, Disable => 1); -- Disables indirect branches instructions in channel 1: type ACTLR_DISISSCH1_IB_Field is ( -- Normal operation. Normal, -- Indirect branches, but not loads to PC instruction type cannot be -- issued in channel 1 Disable) with Size => 1; for ACTLR_DISISSCH1_IB_Field use (Normal => 0, Disable => 1); -- Disables loads to PC instructions in channel 1: type ACTLR_DISISSCH1_LPC_Field is ( -- Normal operation. Normal, -- Loads to PC instruction type cannot be issued in channel 1 Disable) with Size => 1; for ACTLR_DISISSCH1_LPC_Field use (Normal => 0, Disable => 1); -- Disables integer MAC and MUL instructions in channel 1: type ACTLR_DISISSCH1_MAC_MUL_Field is ( -- Normal operation. Normal, -- Integer MAC and MUL instruction type cannot be issued in channel 1 Disable) with Size => 1; for ACTLR_DISISSCH1_MAC_MUL_Field use (Normal => 0, Disable => 1); -- Disables VFP instructions in channel 1: type ACTLR_DISISSCH1_VFP_Field is ( -- Normal operation. Normal, -- VFP instruction type cannot be issued in channel 1 Disable) with Size => 1; for ACTLR_DISISSCH1_VFP_Field use (Normal => 0, Disable => 1); -- Disables dybnamic allocation of ADD ans SUB instructions: type ACTLR_DISDYNADD_Field is ( -- Normal operation. Some ADD and SUB instructions are resolved in EX1. Normal, -- All ADD and SUB instructions are resolved in EX2. Disable) with Size => 1; for ACTLR_DISDYNADD_Field use (Normal => 0, Disable => 1); -- Auxiliary Control Register. The ACTLR provides disable bits for the -- following processor functions: FPU exception outputs, Dual-issue -- functionality, Flushing of the trace output from the ITM and DWT, -- Dynamic read allocate mode. By default this register is set to provide -- optimum performance from the Cortex-M7 processor, and does not normally -- require modification. type ACTLR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Disables Interruption Folding DISFOLD : ACTLR_DISFOLD_Field := Cortex_M_SVD.SCB.Normal; -- unspecified Reserved_3_9 : HAL.UInt7 := 16#0#; -- Disabled FPU exception outputs PFEXCODIS : ACTLR_PFEXCODIS_Field := Cortex_M_SVD.SCB.Normal; -- Disables dynamic read allocate mode for Write-Back Write-Allocate -- memory regions: DISRAMODE : ACTLR_DISRAMODE_Field := Cortex_M_SVD.SCB.Normal; -- Read-only. Disables ITM and DWT ATB flush: DISITMATBFLUSH : ACTLR_DISITMATBFLUSH_Field := Actlr_Disitmatbflush_Field_Reset; -- Disables the Branch Target Address Cache (BTAC): DISBTACREAD : ACTLR_DISBTACREAD_Field := Cortex_M_SVD.SCB.Normal; -- Disables the Branch Target Address Cache allocation: DISBTACALLOC : ACTLR_DISBTACALLOC_Field := Cortex_M_SVD.SCB.Normal; -- Disables critical AXI Read-Under-Read: DISCRITAXIRUR : ACTLR_DISCRITAXIRUR_Field := Cortex_M_SVD.SCB.Normal; -- Disables dual-issued direct branches: DISDI_DB : ACTLR_DISDI_DB_Field := Cortex_M_SVD.SCB.Normal; -- Disables dual-issued indirect branches: DISDI_IB : ACTLR_DISDI_IB_Field := Cortex_M_SVD.SCB.Normal; -- Disables dual-issued loads to PC: DISDI_LPC : ACTLR_DISDI_LPC_Field := Cortex_M_SVD.SCB.Normal; -- Disables integer MAC and MUL dual-issued instructions: DISDI_MAC_MUL : ACTLR_DISDI_MAC_MUL_Field := Cortex_M_SVD.SCB.Normal; -- Disables VFP dual-issued instruction: DISDI_VFP : ACTLR_DISDI_VFP_Field := Cortex_M_SVD.SCB.Normal; -- Disables direct branches instructions in channel 1: DISISSCH1_DB : ACTLR_DISISSCH1_DB_Field := Cortex_M_SVD.SCB.Normal; -- Disables indirect branches instructions in channel 1: DISISSCH1_IB : ACTLR_DISISSCH1_IB_Field := Cortex_M_SVD.SCB.Normal; -- Disables loads to PC instructions in channel 1: DISISSCH1_LPC : ACTLR_DISISSCH1_LPC_Field := Cortex_M_SVD.SCB.Normal; -- Disables integer MAC and MUL instructions in channel 1: DISISSCH1_MAC_MUL : ACTLR_DISISSCH1_MAC_MUL_Field := Cortex_M_SVD.SCB.Normal; -- Disables VFP instructions in channel 1: DISISSCH1_VFP : ACTLR_DISISSCH1_VFP_Field := Cortex_M_SVD.SCB.Normal; -- Disables dybnamic allocation of ADD ans SUB instructions: DISDYNADD : ACTLR_DISDYNADD_Field := Cortex_M_SVD.SCB.Normal; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ACTLR_Register use record Reserved_0_1 at 0 range 0 .. 1; DISFOLD at 0 range 2 .. 2; Reserved_3_9 at 0 range 3 .. 9; PFEXCODIS at 0 range 10 .. 10; DISRAMODE at 0 range 11 .. 11; DISITMATBFLUSH at 0 range 12 .. 12; DISBTACREAD at 0 range 13 .. 13; DISBTACALLOC at 0 range 14 .. 14; DISCRITAXIRUR at 0 range 15 .. 15; DISDI_DB at 0 range 16 .. 16; DISDI_IB at 0 range 17 .. 17; DISDI_LPC at 0 range 18 .. 18; DISDI_MAC_MUL at 0 range 19 .. 19; DISDI_VFP at 0 range 20 .. 20; DISISSCH1_DB at 0 range 21 .. 21; DISISSCH1_IB at 0 range 22 .. 22; DISISSCH1_LPC at 0 range 23 .. 23; DISISSCH1_MAC_MUL at 0 range 24 .. 24; DISISSCH1_VFP at 0 range 25 .. 25; DISDYNADD at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; -- Revision number, the p value in the rnpn product revision identifier. type CPUID_Revision_Field is ( -- Patch 0 P0, -- Patch 1 P1, -- Patch 2 P2) with Size => 4; for CPUID_Revision_Field use (P0 => 0, P1 => 1, P2 => 2); -- Part number of the processor. type CPUID_PartNo_Field is ( -- Cortes-M7 Cortex_M7) with Size => 12; for CPUID_PartNo_Field use (Cortex_M7 => 3111); subtype CPUID_Constant_Field is HAL.UInt4; -- Variant number, the r value in the rnpn product revision identifier. type CPUID_Variant_Field is ( -- Revision 0 R0, -- Revision 1 R1) with Size => 4; for CPUID_Variant_Field use (R0 => 0, R1 => 1); -- Implementer code. type CPUID_Implementer_Field is ( -- ARM Arm) with Size => 8; for CPUID_Implementer_Field use (Arm => 65); -- CPUID Base Register type CPUID_Register is record -- Read-only. Revision number, the p value in the rnpn product revision -- identifier. Revision : CPUID_Revision_Field; -- Read-only. Part number of the processor. PartNo : CPUID_PartNo_Field; -- Read-only. Reads as 0xF. Constant_k : CPUID_Constant_Field; -- Read-only. Variant number, the r value in the rnpn product revision -- identifier. Variant : CPUID_Variant_Field; -- Read-only. Implementer code. Implementer : CPUID_Implementer_Field; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CPUID_Register use record Revision at 0 range 0 .. 3; PartNo at 0 range 4 .. 15; Constant_k at 0 range 16 .. 19; Variant at 0 range 20 .. 23; Implementer at 0 range 24 .. 31; end record; subtype ICSR_VECTACTIVE_Field is HAL.UInt9; -- Indicates whether there are preempted active exceptions. type ICSR_RETTOBASE_Field is ( -- There are preempted active exceptions to execute. Preempted, -- There are no active exceptions, or the currently-executing exception -- is the only active exception. No_Preempted) with Size => 1; for ICSR_RETTOBASE_Field use (Preempted => 0, No_Preempted => 1); subtype ICSR_VECTPENDING_Field is HAL.UInt9; -- Interrupt Control and State Register type ICSR_Register is record -- Read-only. Contains the active exception number. Subtract 16 from -- this value to obtain the CMSIS IRQ number required to index into the -- Interrupt Clear-Enable, Set-Enable, Clear-Pending, Set-Pending or -- Priority Registers. VECTACTIVE : ICSR_VECTACTIVE_Field := 16#0#; -- unspecified Reserved_9_10 : HAL.UInt2 := 16#0#; -- Read-only. Indicates whether there are preempted active exceptions. RETTOBASE : ICSR_RETTOBASE_Field := Cortex_M_SVD.SCB.Preempted; -- Read-only. Indicates the exception number of the highest priority -- pending enabled exception. VECTPENDING : ICSR_VECTPENDING_Field := 16#0#; -- unspecified Reserved_21_21 : HAL.Bit := 16#0#; -- Interrupt pending flag, excluding NMI and Faults ISRPENDING : Boolean := False; -- unspecified Reserved_23_24 : HAL.UInt2 := 16#0#; -- Write-only. SysTick exception clear-pending bit. PENDSTCLR : Boolean := False; -- SysTick exception set-pending bit. PENDSTSET : Boolean := False; -- Write-only. PendSV clear-pending bit. PENDSVCLR : Boolean := False; -- PendSV set-pending bit. PENDSVSET : Boolean := False; -- unspecified Reserved_29_30 : HAL.UInt2 := 16#0#; -- NMI set-pending bit. NMIPENDSET : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ICSR_Register use record VECTACTIVE at 0 range 0 .. 8; Reserved_9_10 at 0 range 9 .. 10; RETTOBASE at 0 range 11 .. 11; VECTPENDING at 0 range 12 .. 20; Reserved_21_21 at 0 range 21 .. 21; ISRPENDING at 0 range 22 .. 22; Reserved_23_24 at 0 range 23 .. 24; PENDSTCLR at 0 range 25 .. 25; PENDSTSET at 0 range 26 .. 26; PENDSVCLR at 0 range 27 .. 27; PENDSVSET at 0 range 28 .. 28; Reserved_29_30 at 0 range 29 .. 30; NMIPENDSET at 0 range 31 .. 31; end record; -- Interrupt priority grouping field. This field determines the split of -- group priority from subpriority. type AIRCR_PRIGROUP_Field is ( -- Group priority bits: [7:1], subpriority bits [0] Bxxxxxxx_Y, -- Group priority bits: [7:2], subpriority bits [1:0] Bxxxxxx_YY, -- Group priority bits: [7:3], subpriority bits [2:0] Bxxxxx_YYY, -- Group priority bits: [7:4], subpriority bits [3:0] Bxxxx_YYYY, -- Group priority bits: [7:5], subpriority bits [4:0] Bxxx_YYYYY, -- Group priority bits: [7:6], subpriority bits [5:0] Bxx_YYYYYY, -- Group priority bits: [7], subpriority bits [6:0] Bx_YYYYYYY, -- Group priority bits: None, subpriority bits [7:0] B_YYYYYYYY) with Size => 3; for AIRCR_PRIGROUP_Field use (Bxxxxxxx_Y => 0, Bxxxxxx_YY => 1, Bxxxxx_YYY => 2, Bxxxx_YYYY => 3, Bxxx_YYYYY => 4, Bxx_YYYYYY => 5, Bx_YYYYYYY => 6, B_YYYYYYYY => 7); -- Data endianness bit setting is implementation defined. type AIRCR_ENDIANNESS_Field is ( -- Data is little endian Little_Endian, -- Data is big endian Big_Endian) with Size => 1; for AIRCR_ENDIANNESS_Field use (Little_Endian => 0, Big_Endian => 1); -- Register key. On write, write 0x5FA to VECTKEY, otherwise the write is -- ignored. Reads as 0xFA05 type AIRCR_VECTKEY_Field is ( -- The write key Key, -- The read key Key_Read) with Size => 16; for AIRCR_VECTKEY_Field use (Key => 1530, Key_Read => 64005); -- Application Interrupt and Reset Control Register type AIRCR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Write-only. System reset request bit setting is implementation -- defined. SYSRESETREQ : Boolean := False; -- unspecified Reserved_3_7 : HAL.UInt5 := 16#0#; -- Interrupt priority grouping field. This field determines the split of -- group priority from subpriority. PRIGROUP : AIRCR_PRIGROUP_Field := Cortex_M_SVD.SCB.Bxxxxxxx_Y; -- unspecified Reserved_11_14 : HAL.UInt4 := 16#0#; -- Read-only. Data endianness bit setting is implementation defined. ENDIANNESS : AIRCR_ENDIANNESS_Field := Cortex_M_SVD.SCB.Little_Endian; -- Register key. On write, write 0x5FA to VECTKEY, otherwise the write -- is ignored. Reads as 0xFA05 VECTKEY : AIRCR_VECTKEY_Field := Cortex_M_SVD.SCB.Key_Read; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for AIRCR_Register use record Reserved_0_1 at 0 range 0 .. 1; SYSRESETREQ at 0 range 2 .. 2; Reserved_3_7 at 0 range 3 .. 7; PRIGROUP at 0 range 8 .. 10; Reserved_11_14 at 0 range 11 .. 14; ENDIANNESS at 0 range 15 .. 15; VECTKEY at 0 range 16 .. 31; end record; -- System Control Register type SCR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Indicates sleep-on-exit when returning from Handler mode to Thread -- mode SLEEPONEXIT : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Controls whether the processor uses sleep or deep sleep as its -- low-power mode SLEEPDEEP : Boolean := False; -- Send event on pending bit SEVONPEND : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SCR_Register use record Reserved_0_0 at 0 range 0 .. 0; SLEEPONEXIT at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; SLEEPDEEP at 0 range 3 .. 3; SEVONPEND at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; -- Indicates how the processor enters Thread mode type CCR_NONBASETHREADENA_Field is ( -- Processor can enter Thread mode only when no exception is active No_Active_Exception, -- Processor can enter Thread mode from any level under the control of -- an EXC_RETURN value On_Exc_Return) with Size => 1; for CCR_NONBASETHREADENA_Field use (No_Active_Exception => 0, On_Exc_Return => 1); -- Configuration and Control Register type CCR_Register is record -- Indicates how the processor enters Thread mode NONBASETHREADENA : CCR_NONBASETHREADENA_Field := Cortex_M_SVD.SCB.No_Active_Exception; -- Enables unprivileged software access to the STIR USERSETMPEND : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Enables unalign access traps. UNALIGNED_TRP : Boolean := False; -- Enables faulting or halting when the processor executes an SDIF or -- UDIV instruction with a divisor of 0. DIV0_TRP : Boolean := False; -- unspecified Reserved_5_7 : HAL.UInt3 := 16#0#; -- Enables handlers with priority -1 or -2 to ignore data BusFaults -- caused by load and store instructions. This applies to the hard -- fault, NMI, and FAULTMASK escalated handlers. BFHFNMIGN : Boolean := False; -- Read-only. Always reads-as-one. It indicates stack alignment on -- exception entry is 8-byte aligned. STKALIGN : Boolean := True; -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; -- Enables L1 data cache. DC : Boolean := False; -- Enables L1 instruction cache. IC : Boolean := False; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record NONBASETHREADENA at 0 range 0 .. 0; USERSETMPEND at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; UNALIGNED_TRP at 0 range 3 .. 3; DIV0_TRP at 0 range 4 .. 4; Reserved_5_7 at 0 range 5 .. 7; BFHFNMIGN at 0 range 8 .. 8; STKALIGN at 0 range 9 .. 9; Reserved_10_15 at 0 range 10 .. 15; DC at 0 range 16 .. 16; IC at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; subtype SHPR1_PRI_4_Field is HAL.UInt8; subtype SHPR1_PRI_5_Field is HAL.UInt8; subtype SHPR1_PRI_6_Field is HAL.UInt8; -- System Handler Priority Register 1 type SHPR1_Register is record -- Priority of the system handler, MemManage PRI_4 : SHPR1_PRI_4_Field := 16#0#; -- Priority of the system handler, BusFault PRI_5 : SHPR1_PRI_5_Field := 16#0#; -- Priority of the system handler, UsageFault PRI_6 : SHPR1_PRI_6_Field := 16#0#; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHPR1_Register use record PRI_4 at 0 range 0 .. 7; PRI_5 at 0 range 8 .. 15; PRI_6 at 0 range 16 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype SHPR2_PRI_11_Field is HAL.UInt8; -- System Handler Priority Register 2 type SHPR2_Register is record -- unspecified Reserved_0_23 : HAL.UInt24 := 16#0#; -- Priority of the system handler, SVCall PRI_11 : SHPR2_PRI_11_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHPR2_Register use record Reserved_0_23 at 0 range 0 .. 23; PRI_11 at 0 range 24 .. 31; end record; subtype SHPR3_PRI_14_Field is HAL.UInt8; subtype SHPR3_PRI_15_Field is HAL.UInt8; -- System Handler Priority Register 3 type SHPR3_Register is record -- unspecified Reserved_0_15 : HAL.UInt16 := 16#0#; -- Priority of the system handler, PendSV PRI_14 : SHPR3_PRI_14_Field := 16#0#; -- Priority of the system handler, SysTick PRI_15 : SHPR3_PRI_15_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHPR3_Register use record Reserved_0_15 at 0 range 0 .. 15; PRI_14 at 0 range 16 .. 23; PRI_15 at 0 range 24 .. 31; end record; -- System Handler Control and State Register type SHPRS_Register is record -- Read-only. MemManage exception active bit, reads as 1 if exception is -- active. MEMFAULTACT : Boolean := False; -- Read-only. BusFault exception active bit, reads as 1 if exception is -- active. BUSFAULTACT : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Read-only. UsageFault exception active bit, reads as 1 if exception -- is active. USGFAULTACT : Boolean := False; -- unspecified Reserved_4_6 : HAL.UInt3 := 16#0#; -- Read-only. SVCall active bit, reads as 1 if exception is active. SVCALLACT : Boolean := False; -- Read-only. Debug Monitor active bit, reads as 1 if exception is -- active. MONITORACT : Boolean := False; -- unspecified Reserved_9_9 : HAL.Bit := 16#0#; -- Read-only. PendSV exception active bit, reads as 1 if exception is -- active. PENDSVACT : Boolean := False; -- Read-only. Systick exception active bit, reads as 1 if exception is -- active. SYSTICKACT : Boolean := False; -- Read-only. UsageFault exception pending bit, reads as 1 if exception -- is pending USGFAULTPENDED : Boolean := False; -- Read-only. MemManage exception pending bit, reads as 1 if exception -- is pending MEMFAULTPENDED : Boolean := False; -- Read-only. BusFault exception pending bit, reads as 1 if exception is -- pending BUSFAULTPENDED : Boolean := False; -- Read-only. SVCall pending bit, reads as 1 if exception is pending SVCALLPENDED : Boolean := False; -- MemManage enable bit, set to 1 to enable MEMFAULTENA : Boolean := False; -- BusFault enable bit, set to 1 to enable BUSFAULTENA : Boolean := False; -- UsageFault enable bit, set to 1 to enable USGFAULTENA : Boolean := False; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHPRS_Register use record MEMFAULTACT at 0 range 0 .. 0; BUSFAULTACT at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; USGFAULTACT at 0 range 3 .. 3; Reserved_4_6 at 0 range 4 .. 6; SVCALLACT at 0 range 7 .. 7; MONITORACT at 0 range 8 .. 8; Reserved_9_9 at 0 range 9 .. 9; PENDSVACT at 0 range 10 .. 10; SYSTICKACT at 0 range 11 .. 11; USGFAULTPENDED at 0 range 12 .. 12; MEMFAULTPENDED at 0 range 13 .. 13; BUSFAULTPENDED at 0 range 14 .. 14; SVCALLPENDED at 0 range 15 .. 15; MEMFAULTENA at 0 range 16 .. 16; BUSFAULTENA at 0 range 17 .. 17; USGFAULTENA at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- MemManage Fault Status Register type MMSR_Register is record -- Instruction access violation flag IACCVIOL : Boolean := False; -- Data access violation flag DACCVIOL : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- MemManage fault on unstacking for a return from exception MUNSTKERR : Boolean := False; -- MemManage fault on stacking for exception entry MSTKERR : Boolean := False; -- MemManage fault during floating-point lazy state preservation. MLSPERR : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- MemManage fault address register valid flag. MMARVALID : Boolean := False; end record with Volatile_Full_Access, Size => 8, Bit_Order => System.Low_Order_First; for MMSR_Register use record IACCVIOL at 0 range 0 .. 0; DACCVIOL at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; MUNSTKERR at 0 range 3 .. 3; MSTKERR at 0 range 4 .. 4; MLSPERR at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; MMARVALID at 0 range 7 .. 7; end record; -- BusFault Status Register type BFSR_Register is record -- Instruction bus error IBUSERR : Boolean := False; -- Precise data bus error PRECISERR : Boolean := False; -- Precise data bus error IMPRECISERR : Boolean := False; -- BusFault on unstacking for a return from exception. UNSTKERR : Boolean := False; -- BusFault on stacking for exception entry. STKERR : Boolean := False; -- BusFault on floating-point lazy state preservation. LSPERR : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- BusFault Address Register valid flag. BFARVALID : Boolean := False; end record with Volatile_Full_Access, Size => 8, Bit_Order => System.Low_Order_First; for BFSR_Register use record IBUSERR at 0 range 0 .. 0; PRECISERR at 0 range 1 .. 1; IMPRECISERR at 0 range 2 .. 2; UNSTKERR at 0 range 3 .. 3; STKERR at 0 range 4 .. 4; LSPERR at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; BFARVALID at 0 range 7 .. 7; end record; -- UsageFault Status Register type UFSR_Register is record -- Undefined instruction UsageFault UNDEFINSTR : Boolean := False; -- Invalid State UsageFault INVSTATE : Boolean := False; -- Invalid PC load UsageFault, caused by an invalid PC load by -- EXC_RETURN INVPC : Boolean := False; -- No coprocessor UsageFault NOCP : Boolean := False; -- unspecified Reserved_4_7 : HAL.UInt4 := 16#0#; -- Unaligned access UsageFault UNALIGNED : Boolean := False; -- Divide by zero UsageFault. DIVBYZERO : Boolean := False; -- unspecified Reserved_10_15 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 16, Bit_Order => System.Low_Order_First; for UFSR_Register use record UNDEFINSTR at 0 range 0 .. 0; INVSTATE at 0 range 1 .. 1; INVPC at 0 range 2 .. 2; NOCP at 0 range 3 .. 3; Reserved_4_7 at 0 range 4 .. 7; UNALIGNED at 0 range 8 .. 8; DIVBYZERO at 0 range 9 .. 9; Reserved_10_15 at 0 range 10 .. 15; end record; -- HardFault Status Register type HFSR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Indicates a BusFault on a vector table read during exception -- processing. VECTTBL : Boolean := False; -- unspecified Reserved_2_29 : HAL.UInt28 := 16#0#; -- Indicates a forced hard fault, generated by escalation of a fault -- with configurable priority that cannot be handled, either because of -- priority or because it is disabled. FORCED : Boolean := False; -- Reserved for Debug use. When writing to the register, you must write -- 1 to this bit, otherwise behavior is UNPREDICTABLE. DEBUGEVT : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for HFSR_Register use record Reserved_0_0 at 0 range 0 .. 0; VECTTBL at 0 range 1 .. 1; Reserved_2_29 at 0 range 2 .. 29; FORCED at 0 range 30 .. 30; DEBUGEVT at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- System control block type SCB_Peripheral is record -- Auxiliary Control Register. The ACTLR provides disable bits for the -- following processor functions: FPU exception outputs, Dual-issue -- functionality, Flushing of the trace output from the ITM and DWT, -- Dynamic read allocate mode. By default this register is set to -- provide optimum performance from the Cortex-M7 processor, and does -- not normally require modification. ACTLR : aliased ACTLR_Register; -- CPUID Base Register CPUID : aliased CPUID_Register; -- Interrupt Control and State Register ICSR : aliased ICSR_Register; -- Vector Table Offset Register VTOR : aliased HAL.UInt32; -- Application Interrupt and Reset Control Register AIRCR : aliased AIRCR_Register; -- System Control Register SCR : aliased SCR_Register; -- Configuration and Control Register CCR : aliased CCR_Register; -- System Handler Priority Register 1 SHPR1 : aliased SHPR1_Register; -- System Handler Priority Register 2 SHPR2 : aliased SHPR2_Register; -- System Handler Priority Register 3 SHPR3 : aliased SHPR3_Register; -- System Handler Control and State Register SHPRS : aliased SHPRS_Register; -- MemManage Fault Status Register MMSR : aliased MMSR_Register; -- BusFault Status Register BFSR : aliased BFSR_Register; -- UsageFault Status Register UFSR : aliased UFSR_Register; -- HardFault Status Register HFSR : aliased HFSR_Register; -- MemManage Fault Address Register MMAR : aliased HAL.UInt32; -- BusFault Address Register BFAR : aliased HAL.UInt32; end record with Volatile; for SCB_Peripheral use record ACTLR at 16#8# range 0 .. 31; CPUID at 16#D00# range 0 .. 31; ICSR at 16#D04# range 0 .. 31; VTOR at 16#D08# range 0 .. 31; AIRCR at 16#D0C# range 0 .. 31; SCR at 16#D10# range 0 .. 31; CCR at 16#D14# range 0 .. 31; SHPR1 at 16#D18# range 0 .. 31; SHPR2 at 16#D1C# range 0 .. 31; SHPR3 at 16#D20# range 0 .. 31; SHPRS at 16#D24# range 0 .. 31; MMSR at 16#D28# range 0 .. 7; BFSR at 16#D29# range 0 .. 7; UFSR at 16#D2A# range 0 .. 15; HFSR at 16#D2C# range 0 .. 31; MMAR at 16#D34# range 0 .. 31; BFAR at 16#D38# range 0 .. 31; end record; -- System control block SCB_Periph : aliased SCB_Peripheral with Import, Address => System'To_Address (16#E000E000#); end Cortex_M_SVD.SCB;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This file is generated, don't edit it. ------------------------------------------------------------------------------ with AMF.Elements.Generic_Hash; function AMF.CMOF.Package_Imports.Hash is new AMF.Elements.Generic_Hash (CMOF_Package_Import, CMOF_Package_Import_Access);
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_poly_line_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; coordinate_mode : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; drawable : aliased xcb.xcb_drawable_t; gc : aliased xcb.xcb_gcontext_t; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_poly_line_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_poly_line_request_t.Item, Element_Array => xcb.xcb_poly_line_request_t.Item_Array, Default_Terminator => (others => <>)); subtype Pointer is C_Pointers.Pointer; -- Pointer_Array -- type Pointer_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_poly_line_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_poly_line_request_t.Pointer, Element_Array => xcb.xcb_poly_line_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_poly_line_request_t;
-- { dg-do run } with dispatch2_p; use dispatch2_p; procedure dispatch2 is Obj : Object_Ptr := new Object; begin if Obj.Get_Ptr /= Obj.Impl_Of then raise Program_Error; end if; end;
----------------------------------------------------------------------- -- ADO Sqlite Database -- SQLite Database connections -- Copyright (C) 2009, 2010, 2011, 2012 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Sqlite3_H; with Interfaces.C.Strings; with Util.Log; with Util.Log.Loggers; with ADO.Statements.Sqlite; package body ADO.Drivers.Connections.Sqlite is use Util.Log; use ADO.Statements.Sqlite; use Interfaces.C; pragma Linker_Options ("-lsqlite3"); Log : constant Loggers.Logger := Loggers.Create ("ADO.Databases.Sqlite"); Driver_Name : aliased constant String := "sqlite"; Driver : aliased Sqlite_Driver; No_Callback : constant Sqlite3_H.sqlite3_callback := null; -- ------------------------------ -- Get the database driver which manages this connection. -- ------------------------------ overriding function Get_Driver (Database : in Database_Connection) return Driver_Access is pragma Unreferenced (Database); begin return Driver'Access; end Get_Driver; -- ------------------------------ -- Check for an error after executing a sqlite statement. -- ------------------------------ procedure Check_Error (Connection : in Sqlite_Access; Result : in int) is begin if Result /= Sqlite3_H.SQLITE_OK and Result /= Sqlite3_H.SQLITE_DONE then declare Error : constant Strings.chars_ptr := Sqlite3_H.sqlite3_errmsg (Connection); Msg : constant String := Strings.Value (Error); begin Log.Error ("Error {0}: {1}", int'Image (Result), Msg); end; end if; end Check_Error; overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Query_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; overriding function Create_Statement (Database : in Database_Connection; Query : in String) return Query_Statement_Access is begin return Create_Statement (Database => Database.Server, Query => Query); end Create_Statement; -- ------------------------------ -- Create a delete statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Delete_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Create an insert statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Insert_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Create an update statement. -- ------------------------------ overriding function Create_Statement (Database : in Database_Connection; Table : in ADO.Schemas.Class_Mapping_Access) return Update_Statement_Access is begin return Create_Statement (Database => Database.Server, Table => Table); end Create_Statement; -- ------------------------------ -- Start a transaction. -- ------------------------------ procedure Begin_Transaction (Database : in out Database_Connection) is begin -- Database.Execute ("begin transaction;"); null; end Begin_Transaction; -- ------------------------------ -- Commit the current transaction. -- ------------------------------ procedure Commit (Database : in out Database_Connection) is begin -- Database.Execute ("commit transaction;"); null; end Commit; -- ------------------------------ -- Rollback the current transaction. -- ------------------------------ procedure Rollback (Database : in out Database_Connection) is begin -- Database.Execute ("rollback transaction;"); null; end Rollback; procedure Sqlite3_Free (Arg1 : Strings.chars_ptr); pragma Import (C, sqlite3_free, "sqlite3_free"); procedure Execute (Database : in out Database_Connection; SQL : in Query_String) is use type Strings.chars_ptr; SQL_Stat : Strings.chars_ptr := Strings.New_String (SQL); Result : int; Error_Msg : Strings.chars_ptr; begin Log.Debug ("Execute: {0}", SQL); for Retry in 1 .. 100 loop Result := Sqlite3_H.sqlite3_exec (Database.Server, SQL_Stat, No_Callback, System.Null_Address, Error_Msg'Address); exit when Result /= Sqlite3_H.SQLITE_BUSY; delay 0.01 * Retry; end loop; Check_Error (Database.Server, Result); if Error_Msg /= Strings.Null_Ptr then Log.Error ("Error: {0}", Strings.Value (Error_Msg)); Sqlite3_Free (Error_Msg); end if; -- Free Strings.Free (SQL_Stat); end Execute; -- ------------------------------ -- Closes the database connection -- ------------------------------ overriding procedure Close (Database : in out Database_Connection) is pragma Unreferenced (Database); Result : int; begin Log.Info ("Close connection"); -- if Database.Count = 1 then -- Result := Sqlite3_H.sqlite3_close (Database.Server); -- Database.Server := System.Null_Address; -- end if; pragma Unreferenced (Result); end Close; -- ------------------------------ -- Releases the sqlite connection if it is open -- ------------------------------ overriding procedure Finalize (Database : in out Database_Connection) is Result : int; begin Log.Debug ("Release connection"); Database.Count := Database.Count - 1; -- if Database.Count <= 1 then -- Result := Sqlite3_H.Sqlite3_Close (Database.Server); -- end if; -- Database.Server := System.Null_Address; pragma Unreferenced (Result); end Finalize; -- ------------------------------ -- Load the database schema definition for the current database. -- ------------------------------ overriding procedure Load_Schema (Database : in Database_Connection; Schema : out ADO.Schemas.Schema_Definition) is begin null; end Load_Schema; DB : ADO.Drivers.Connections.Database_Connection_Access := null; -- ------------------------------ -- Initialize the database connection manager. -- ------------------------------ procedure Create_Connection (D : in out Sqlite_Driver; Config : in Configuration'Class; Result : out ADO.Drivers.Connections.Database_Connection_Access) is pragma Unreferenced (D); use Strings; use type System.Address; Name : constant String := To_String (Config.Database); Filename : Strings.chars_ptr; Status : int; Handle : aliased System.Address; Flags : constant int := Sqlite3_H.SQLITE_OPEN_FULLMUTEX + Sqlite3_H.SQLITE_OPEN_READWRITE; begin Log.Info ("Opening database {0}", Name); if DB /= null then Result := DB; DB.Count := DB.Count + 1; return; end if; Filename := Strings.New_String (Name); Status := Sqlite3_H.sqlite3_open_v2 (Filename, Handle'Access, Flags, Strings.Null_Ptr); Strings.Free (Filename); if Status /= Sqlite3_H.SQLITE_OK then raise DB_Error; end if; declare Database : constant Database_Connection_Access := new Database_Connection; procedure Configure (Name, Item : in Util.Properties.Value); procedure Configure (Name, Item : in Util.Properties.Value) is SQL : constant String := "PRAGMA " & To_String (Name) & "=" & To_String (Item); begin Database.Execute (SQL); end Configure; begin Database.Server := Handle; Database.Count := 2; Database.Name := Config.Database; -- Configure the connection by setting up the SQLite 'pragma X=Y' SQL commands. -- Typical configuration includes: -- synchronous=OFF -- temp_store=MEMORY -- encoding='UTF-8' Config.Properties.Iterate (Process => Configure'Access); Result := Database.all'Access; DB := Result; end; end Create_Connection; -- ------------------------------ -- Initialize the SQLite driver. -- ------------------------------ procedure Initialize is use type Util.Strings.Name_Access; begin Log.Debug ("Initializing sqlite driver"); if Driver.Name = null then Driver.Name := Driver_Name'Access; Register (Driver'Access); end if; end Initialize; end ADO.Drivers.Connections.Sqlite;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>circ_buff_write_128</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>gmem_out</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <direction>2</direction> <if_type>4</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>output_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>output.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_3"> <Value> <Obj> <type>1</type> <id>3</id> <name>stream_in_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>fifo.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_4"> <Value> <Obj> <type>1</type> <id>4</id> <name>reset</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>reset</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <direction>0</direction> <if_type>0</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>85</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_5"> <Value> <Obj> <type>0</type> <id>6</id> <name>output_V_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>output.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>119</item> <item>120</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.00</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>7</id> <name>tmp_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>28</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>122</item> <item>123</item> <item>125</item> <item>127</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>8</id> <name>tmp_17_cast</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>128</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>13</id> <name>data_V</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>36</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second class_id="12" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="13" tracking_level="0" version="0"> <first class_id="14" tracking_level="0" version="0"> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>36</second> </item> </second> </item> </inlineStackInfo> <originalName>data.V</originalName> <rtlName></rtlName> <coreName>RAM</coreName> </Obj> <bitwidth>96</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>130</item> </oprand_edges> <opcode>alloca</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>19</id> <name>reset_read</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>47</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>47</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>132</item> <item>133</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>20</id> <name>tmp</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>47</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>47</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>134</item> <item>136</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.85</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>21</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>47</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>47</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>137</item> <item>138</item> <item>139</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>23</id> <name>output_V2_sum</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>140</item> <item>142</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.15</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>24</id> <name>output_V2_sum_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>143</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>25</id> <name>gmem_out_addr</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>144</item> <item>145</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>26</id> <name>stream_tail_V_req</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>147</item> <item>148</item> <item>150</item> </oprand_edges> <opcode>readreq</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>27</id> <name>stream_tail_V</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>54</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>54</second> </item> </second> </item> </inlineStackInfo> <originalName>stream_tail.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>152</item> <item>153</item> <item>467</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>28</id> <name>stream_head_V_load</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>154</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>29</id> <name>lhs_V_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>155</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>30</id> <name>ret_V</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName>ret.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>156</item> <item>158</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.92</m_delay> <m_topoIndex>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>31</id> <name>ret_V_2_cast6</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>159</item> <item>161</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.92</m_delay> <m_topoIndex>16</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>32</id> <name>ret_V_2_cast5</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>162</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>1</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>1</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>33</id> <name>ret_V_2_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>129</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>163</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_3_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>129</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>164</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>35</id> <name>tmp_4</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>165</item> <item>166</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.46</m_delay> <m_topoIndex>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>36</id> <name>ret_V_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>129</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>167</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>37</id> <name>tmp_6</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>168</item> <item>169</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.46</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>38</id> <name>or_cond</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>170</item> <item>171</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.33</m_delay> <m_topoIndex>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>39</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>59</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>59</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>172</item> <item>173</item> <item>174</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>24</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>41</id> <name>tmp_7</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>175</item> <item>176</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>1</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.46</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>42</id> <name>tmp_8</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>76</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>177</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>43</id> <name>tmp_2</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>76</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>178</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>27</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>44</id> <name>p_neg1_pn_v_cast_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>179</item> <item>181</item> <item>183</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>1</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.47</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>45</id> <name>p_neg1_pn</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>74</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>74</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>184</item> <item>185</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>1</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>29</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>46</id> <name>bytes_to_write</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>76</second> </item> </second> </item> </inlineStackInfo> <originalName>bytes_to_write</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>186</item> <item>187</item> </oprand_edges> <opcode>sub</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>1</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.82</m_delay> <m_topoIndex>30</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>47</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>188</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.75</m_delay> <m_topoIndex>31</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>49</id> <name>h</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>h</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>190</item> <item>191</item> <item>192</item> <item>193</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>32</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>50</id> <name>bytes_to_write_2</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName>bytes_to_write</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>194</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>33</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>51</id> <name>tmp_s</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>195</item> <item>196</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.86</m_delay> <m_topoIndex>34</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>52</id> <name>h_1</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName>h</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>197</item> <item>199</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.00</m_delay> <m_topoIndex>35</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>53</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>200</item> <item>201</item> <item>202</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.75</m_delay> <m_topoIndex>36</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>56</id> <name>stream_in_V_read</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>89</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>89</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>65</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>204</item> <item>205</item> </oprand_edges> <opcode>nbread</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>37</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>57</id> <name>empty_n</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>89</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>89</second> </item> </second> </item> </inlineStackInfo> <originalName>empty_n</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>206</item> </oprand_edges> <opcode>extractvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>38</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>58</id> <name>tmp_22</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>89</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>89</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>207</item> </oprand_edges> <opcode>extractvalue</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>39</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>59</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>89</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>89</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>208</item> <item>209</item> <item>210</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.75</m_delay> <m_topoIndex>40</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>61</id> <name>tmp_20</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName>tmp</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>212</item> <item>213</item> <item>476</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>41</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>62</id> <name>tmp_21</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>214</item> <item>216</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>42</m_topoIndex> <m_clusterGroupNumber>1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>63</id> <name>tmp_3</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>89</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>89</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>217</item> <item>218</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.44</m_delay> <m_topoIndex>43</m_topoIndex> <m_clusterGroupNumber>1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>64</id> <name>tmp_5</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>220</item> <item>221</item> <item>223</item> <item>225</item> </oprand_edges> <opcode>partselect</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>44</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>65</id> <name>tmp_10</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>96</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>227</item> <item>228</item> <item>229</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>45</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>66</id> <name>tmp_11</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>105</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>105</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>230</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>46</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>67</id> <name>data_V_addr</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>105</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>105</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>231</item> <item>233</item> <item>234</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>47</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>68</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>105</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>105</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>235</item> <item>236</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.35</m_delay> <m_topoIndex>48</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>69</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>237</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>49</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>71</id> <name>bytes_to_write_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>bytes_to_write</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>238</item> <item>239</item> <item>240</item> <item>241</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>50</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>72</id> <name>tmp_9</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>242</item> <item>244</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.86</m_delay> <m_topoIndex>51</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>73</id> <name>tmp_14</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>245</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>52</m_topoIndex> <m_clusterGroupNumber>2</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>74</id> <name>tmp_17</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>85</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>85</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>246</item> <item>247</item> <item>249</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>53</m_topoIndex> <m_clusterGroupNumber>2</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>75</id> <name>tmp_18</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>250</item> <item>251</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.92</m_delay> <m_topoIndex>54</m_topoIndex> <m_clusterGroupNumber>2</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>76</id> <name>tmp_19</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>252</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>55</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>77</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>253</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.75</m_delay> <m_topoIndex>56</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>79</id> <name>t_V</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName>t.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>254</item> <item>255</item> <item>256</item> <item>257</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>57</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>80</id> <name>h1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>h</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>258</item> <item>259</item> <item>260</item> <item>261</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>58</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>81</id> <name>h1_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>262</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>59</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>82</id> <name>tmp_12</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>263</item> <item>264</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.86</m_delay> <m_topoIndex>60</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>84</id> <name>h_2</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName>h</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>265</item> <item>266</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.00</m_delay> <m_topoIndex>61</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>85</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>267</item> <item>268</item> <item>269</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>62</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>90</id> <name>tmp_14_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>270</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>63</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>91</id> <name>tmp_15</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>271</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>64</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>92</id> <name>data_V_addr_1</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>272</item> <item>273</item> <item>274</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>65</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>93</id> <name>data_V_load</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>96</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>275</item> </oprand_edges> <opcode>load</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.35</m_delay> <m_topoIndex>66</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>94</id> <name>extLd</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>276</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>73</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>95</id> <name>output_V2_sum4</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>277</item> <item>278</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.15</m_delay> <m_topoIndex>67</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>96</id> <name>output_V2_sum4_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>279</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>70</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>97</id> <name>gmem_out_addr_1</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>280</item> <item>281</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>71</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>98</id> <name>gmem_out_addr_1_req</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>283</item> <item>284</item> <item>285</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>72</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_76"> <Value> <Obj> <type>0</type> <id>99</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>7</count> <item_version>0</item_version> <item>287</item> <item>288</item> <item>289</item> <item>290</item> <item>469</item> <item>472</item> <item>473</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>74</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_77"> <Value> <Obj> <type>0</type> <id>100</id> <name>gmem_out_addr_1_resp</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>113</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>113</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>292</item> <item>293</item> <item>468</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>75</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_78"> <Value> <Obj> <type>0</type> <id>101</id> <name>tmp_16</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>115</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>115</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>294</item> <item>295</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.92</m_delay> <m_topoIndex>68</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_79"> <Value> <Obj> <type>0</type> <id>102</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>116</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>116</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>296</item> <item>297</item> <item>474</item> </oprand_edges> <opcode>store</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>69</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_80"> <Value> <Obj> <type>0</type> <id>104</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>109</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>109</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>298</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>76</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_81"> <Value> <Obj> <type>0</type> <id>106</id> <name>output_V2_sum3</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>299</item> <item>301</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.15</m_delay> <m_topoIndex>77</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_82"> <Value> <Obj> <type>0</type> <id>107</id> <name>output_V2_sum3_cast</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>302</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>78</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_83"> <Value> <Obj> <type>0</type> <id>108</id> <name>gmem_out_addr_2</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>128</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>303</item> <item>304</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>79</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_84"> <Value> <Obj> <type>0</type> <id>109</id> <name>gmem_out_addr_2_req</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>305</item> <item>306</item> <item>307</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>80</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_85"> <Value> <Obj> <type>0</type> <id>110</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>6</count> <item_version>0</item_version> <item>308</item> <item>309</item> <item>310</item> <item>311</item> <item>471</item> <item>475</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>81</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_86"> <Value> <Obj> <type>0</type> <id>111</id> <name>gmem_out_addr_2_resp</name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>121</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>121</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>312</item> <item>313</item> <item>470</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>2.91</m_delay> <m_topoIndex>82</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_87"> <Value> <Obj> <type>0</type> <id>112</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>314</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>83</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_88"> <Value> <Obj> <type>0</type> <id>114</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>315</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>84</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_89"> <Value> <Obj> <type>0</type> <id>116</id> <name></name> <fileName>estream_write/c_src/circ_buff_write_128.cpp</fileName> <fileDirectory>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</fileDirectory> <lineNumber>124</lineNumber> <contextFuncName>circ_buff_write_128</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/home/ylxiao/ws_183/estream4fccm2021_1IP/workspace/hls_prj</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>estream_write/c_src/circ_buff_write_128.cpp</first> <second>circ_buff_write_128</second> </first> <second>124</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>85</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>19</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_90"> <Value> <Obj> <type>2</type> <id>124</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>4</content> </item> <item class_id_reference="16" object_id="_91"> <Value> <Obj> <type>2</type> <id>126</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>31</content> </item> <item class_id_reference="16" object_id="_92"> <Value> <Obj> <type>2</type> <id>129</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_93"> <Value> <Obj> <type>2</type> <id>135</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_94"> <Value> <Obj> <type>2</type> <id>141</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <const_type>0</const_type> <content>512</content> </item> <item class_id_reference="16" object_id="_95"> <Value> <Obj> <type>2</type> <id>149</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_96"> <Value> <Obj> <type>2</type> <id>157</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>10</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_97"> <Value> <Obj> <type>2</type> <id>160</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_98"> <Value> <Obj> <type>2</type> <id>180</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <const_type>0</const_type> <content>65535</content> </item> <item class_id_reference="16" object_id="_99"> <Value> <Obj> <type>2</type> <id>182</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <const_type>0</const_type> <content>511</content> </item> <item class_id_reference="16" object_id="_100"> <Value> <Obj> <type>2</type> <id>189</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_101"> <Value> <Obj> <type>2</type> <id>198</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>15</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_102"> <Value> <Obj> <type>2</type> <id>215</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>32</content> </item> <item class_id_reference="16" object_id="_103"> <Value> <Obj> <type>2</type> <id>222</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>32</content> </item> <item class_id_reference="16" object_id="_104"> <Value> <Obj> <type>2</type> <id>224</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <const_type>0</const_type> <content>63</content> </item> <item class_id_reference="16" object_id="_105"> <Value> <Obj> <type>2</type> <id>232</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>64</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_106"> <Value> <Obj> <type>2</type> <id>243</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_107"> <Value> <Obj> <type>2</type> <id>248</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>9</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_108"> <Value> <Obj> <type>2</type> <id>300</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>29</bitwidth> </Value> <const_type>0</const_type> <content>513</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_109"> <Obj> <type>3</type> <id>22</id> <name>codeRepl</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>7</count> <item_version>0</item_version> <item>6</item> <item>7</item> <item>8</item> <item>13</item> <item>19</item> <item>20</item> <item>21</item> </node_objs> </item> <item class_id_reference="18" object_id="_110"> <Obj> <type>3</type> <id>40</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>17</count> <item_version>0</item_version> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> <item>29</item> <item>30</item> <item>31</item> <item>32</item> <item>33</item> <item>34</item> <item>35</item> <item>36</item> <item>37</item> <item>38</item> <item>39</item> </node_objs> </item> <item class_id_reference="18" object_id="_111"> <Obj> <type>3</type> <id>48</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>7</count> <item_version>0</item_version> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> </node_objs> </item> <item class_id_reference="18" object_id="_112"> <Obj> <type>3</type> <id>54</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> </node_objs> </item> <item class_id_reference="18" object_id="_113"> <Obj> <type>3</type> <id>60</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>56</item> <item>57</item> <item>58</item> <item>59</item> </node_objs> </item> <item class_id_reference="18" object_id="_114"> <Obj> <type>3</type> <id>70</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>9</count> <item_version>0</item_version> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> <item>68</item> <item>69</item> </node_objs> </item> <item class_id_reference="18" object_id="_115"> <Obj> <type>3</type> <id>78</id> <name>.loopexit</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>7</count> <item_version>0</item_version> <item>71</item> <item>72</item> <item>73</item> <item>74</item> <item>75</item> <item>76</item> <item>77</item> </node_objs> </item> <item class_id_reference="18" object_id="_116"> <Obj> <type>3</type> <id>86</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>6</count> <item_version>0</item_version> <item>79</item> <item>80</item> <item>81</item> <item>82</item> <item>84</item> <item>85</item> </node_objs> </item> <item class_id_reference="18" object_id="_117"> <Obj> <type>3</type> <id>105</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>14</count> <item_version>0</item_version> <item>90</item> <item>91</item> <item>92</item> <item>93</item> <item>94</item> <item>95</item> <item>96</item> <item>97</item> <item>98</item> <item>99</item> <item>100</item> <item>101</item> <item>102</item> <item>104</item> </node_objs> </item> <item class_id_reference="18" object_id="_118"> <Obj> <type>3</type> <id>113</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>7</count> <item_version>0</item_version> <item>106</item> <item>107</item> <item>108</item> <item>109</item> <item>110</item> <item>111</item> <item>112</item> </node_objs> </item> <item class_id_reference="18" object_id="_119"> <Obj> <type>3</type> <id>115</id> <name>.loopexit528</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>114</item> </node_objs> </item> <item class_id_reference="18" object_id="_120"> <Obj> <type>3</type> <id>117</id> <name>._crit_edge533</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>116</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>178</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_121"> <id>120</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>6</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_122"> <id>123</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_123"> <id>125</id> <edge_type>1</edge_type> <source_obj>124</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_124"> <id>127</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_125"> <id>128</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_126"> <id>130</id> <edge_type>1</edge_type> <source_obj>129</source_obj> <sink_obj>13</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_127"> <id>133</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_128"> <id>134</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_129"> <id>136</id> <edge_type>1</edge_type> <source_obj>135</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_130"> <id>137</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_131"> <id>138</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_132"> <id>139</id> <edge_type>2</edge_type> <source_obj>117</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_133"> <id>140</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_134"> <id>142</id> <edge_type>1</edge_type> <source_obj>141</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_135"> <id>143</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_136"> <id>144</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_137"> <id>145</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_138"> <id>148</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_139"> <id>150</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_140"> <id>153</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_141"> <id>154</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>28</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_142"> <id>155</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_143"> <id>156</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_144"> <id>158</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_145"> <id>159</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_146"> <id>161</id> <edge_type>1</edge_type> <source_obj>160</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_147"> <id>162</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>32</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_148"> <id>163</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_149"> <id>164</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_150"> <id>165</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_151"> <id>166</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_152"> <id>167</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>36</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_153"> <id>168</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_154"> <id>169</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_155"> <id>170</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_156"> <id>171</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_157"> <id>172</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_158"> <id>173</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_159"> <id>174</id> <edge_type>2</edge_type> <source_obj>115</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_160"> <id>175</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_161"> <id>176</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_162"> <id>177</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>42</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_163"> <id>178</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_164"> <id>179</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_165"> <id>181</id> <edge_type>1</edge_type> <source_obj>180</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_166"> <id>183</id> <edge_type>1</edge_type> <source_obj>182</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_167"> <id>184</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_168"> <id>185</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_169"> <id>186</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_170"> <id>187</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_171"> <id>188</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_172"> <id>190</id> <edge_type>1</edge_type> <source_obj>189</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_173"> <id>191</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_174"> <id>192</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>49</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_175"> <id>193</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>49</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_176"> <id>194</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>50</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_177"> <id>195</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_178"> <id>196</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>51</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_179"> <id>197</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_180"> <id>199</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_181"> <id>200</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_182"> <id>201</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_183"> <id>202</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_184"> <id>205</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>56</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_185"> <id>206</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>57</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_186"> <id>207</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>58</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_187"> <id>208</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_188"> <id>209</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_189"> <id>210</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>59</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_190"> <id>213</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_191"> <id>214</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_192"> <id>216</id> <edge_type>1</edge_type> <source_obj>215</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_193"> <id>217</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_194"> <id>218</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>63</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_195"> <id>221</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_196"> <id>223</id> <edge_type>1</edge_type> <source_obj>222</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_197"> <id>225</id> <edge_type>1</edge_type> <source_obj>224</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_198"> <id>228</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_199"> <id>229</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>65</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_200"> <id>230</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_201"> <id>231</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_202"> <id>233</id> <edge_type>1</edge_type> <source_obj>232</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_203"> <id>234</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_204"> <id>235</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_205"> <id>236</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_206"> <id>237</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_207"> <id>238</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_208"> <id>239</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_209"> <id>240</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_210"> <id>241</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_211"> <id>242</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_212"> <id>244</id> <edge_type>1</edge_type> <source_obj>243</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_213"> <id>245</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_214"> <id>246</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_215"> <id>247</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_216"> <id>249</id> <edge_type>1</edge_type> <source_obj>248</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_217"> <id>250</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_218"> <id>251</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_219"> <id>252</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>76</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_220"> <id>253</id> <edge_type>2</edge_type> <source_obj>86</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_221"> <id>254</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_222"> <id>255</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_223"> <id>256</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>79</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_224"> <id>257</id> <edge_type>2</edge_type> <source_obj>105</source_obj> <sink_obj>79</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_225"> <id>258</id> <edge_type>1</edge_type> <source_obj>189</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_226"> <id>259</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_227"> <id>260</id> <edge_type>1</edge_type> <source_obj>84</source_obj> <sink_obj>80</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_228"> <id>261</id> <edge_type>2</edge_type> <source_obj>105</source_obj> <sink_obj>80</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_229"> <id>262</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_230"> <id>263</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>82</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_231"> <id>264</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>82</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_232"> <id>265</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>84</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_233"> <id>266</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>84</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_234"> <id>267</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_235"> <id>268</id> <edge_type>2</edge_type> <source_obj>113</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_236"> <id>269</id> <edge_type>2</edge_type> <source_obj>105</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_237"> <id>270</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>90</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_238"> <id>271</id> <edge_type>1</edge_type> <source_obj>80</source_obj> <sink_obj>91</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_239"> <id>272</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>92</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_240"> <id>273</id> <edge_type>1</edge_type> <source_obj>232</source_obj> <sink_obj>92</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_241"> <id>274</id> <edge_type>1</edge_type> <source_obj>91</source_obj> <sink_obj>92</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_242"> <id>275</id> <edge_type>1</edge_type> <source_obj>92</source_obj> <sink_obj>93</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_243"> <id>276</id> <edge_type>1</edge_type> <source_obj>93</source_obj> <sink_obj>94</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_244"> <id>277</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>95</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_245"> <id>278</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>95</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_246"> <id>279</id> <edge_type>1</edge_type> <source_obj>95</source_obj> <sink_obj>96</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_247"> <id>280</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>97</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_248"> <id>281</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>97</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_249"> <id>284</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>98</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_250"> <id>285</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>98</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_251"> <id>288</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_252"> <id>289</id> <edge_type>1</edge_type> <source_obj>94</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_253"> <id>290</id> <edge_type>1</edge_type> <source_obj>180</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_254"> <id>293</id> <edge_type>1</edge_type> <source_obj>97</source_obj> <sink_obj>100</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_255"> <id>294</id> <edge_type>1</edge_type> <source_obj>79</source_obj> <sink_obj>101</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_256"> <id>295</id> <edge_type>1</edge_type> <source_obj>160</source_obj> <sink_obj>101</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_257"> <id>296</id> <edge_type>1</edge_type> <source_obj>101</source_obj> <sink_obj>102</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_258"> <id>297</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>102</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_259"> <id>298</id> <edge_type>2</edge_type> <source_obj>86</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_260"> <id>299</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>106</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_261"> <id>301</id> <edge_type>1</edge_type> <source_obj>300</source_obj> <sink_obj>106</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_262"> <id>302</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>107</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_263"> <id>303</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>108</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_264"> <id>304</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>108</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_265"> <id>306</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>109</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_266"> <id>307</id> <edge_type>1</edge_type> <source_obj>149</source_obj> <sink_obj>109</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_267"> <id>309</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_268"> <id>310</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_269"> <id>311</id> <edge_type>1</edge_type> <source_obj>180</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_270"> <id>313</id> <edge_type>1</edge_type> <source_obj>108</source_obj> <sink_obj>111</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_271"> <id>314</id> <edge_type>2</edge_type> <source_obj>115</source_obj> <sink_obj>112</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_272"> <id>315</id> <edge_type>2</edge_type> <source_obj>117</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_273"> <id>451</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>117</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_274"> <id>452</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_275"> <id>453</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>115</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_276"> <id>454</id> <edge_type>2</edge_type> <source_obj>40</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_277"> <id>455</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_278"> <id>456</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>60</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_279"> <id>457</id> <edge_type>2</edge_type> <source_obj>54</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_280"> <id>458</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>70</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_281"> <id>459</id> <edge_type>2</edge_type> <source_obj>60</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_282"> <id>460</id> <edge_type>2</edge_type> <source_obj>70</source_obj> <sink_obj>54</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_283"> <id>461</id> <edge_type>2</edge_type> <source_obj>78</source_obj> <sink_obj>86</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_284"> <id>462</id> <edge_type>2</edge_type> <source_obj>86</source_obj> <sink_obj>105</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_285"> <id>463</id> <edge_type>2</edge_type> <source_obj>86</source_obj> <sink_obj>113</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_286"> <id>464</id> <edge_type>2</edge_type> <source_obj>105</source_obj> <sink_obj>86</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_287"> <id>465</id> <edge_type>2</edge_type> <source_obj>113</source_obj> <sink_obj>115</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_288"> <id>466</id> <edge_type>2</edge_type> <source_obj>115</source_obj> <sink_obj>117</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_289"> <id>467</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_290"> <id>468</id> <edge_type>4</edge_type> <source_obj>99</source_obj> <sink_obj>100</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_291"> <id>469</id> <edge_type>4</edge_type> <source_obj>98</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_292"> <id>470</id> <edge_type>4</edge_type> <source_obj>110</source_obj> <sink_obj>111</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_293"> <id>471</id> <edge_type>4</edge_type> <source_obj>109</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_294"> <id>472</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_295"> <id>473</id> <edge_type>4</edge_type> <source_obj>27</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_296"> <id>474</id> <edge_type>4</edge_type> <source_obj>28</source_obj> <sink_obj>102</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_297"> <id>475</id> <edge_type>4</edge_type> <source_obj>27</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_298"> <id>476</id> <edge_type>4</edge_type> <source_obj>56</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>8</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_299"> <mId>1</mId> <mTag>circ_buff_write_128</mTag> <mType>0</mType> <sub_regions> <count>7</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> <item>5</item> <item>6</item> <item>7</item> <item>8</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_300"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>3</count> <item_version>0</item_version> <item>22</item> <item>40</item> <item>48</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>9</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_301"> <mId>3</mId> <mTag>fifo_read</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>3</count> <item_version>0</item_version> <item>54</item> <item>60</item> <item>70</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>-1</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_302"> <mId>4</mId> <mTag>Region 1</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>78</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_303"> <mId>5</mId> <mTag>gmem_write</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>86</item> <item>105</item> </basic_blocks> <mII>1</mII> <mDepth>8</mDepth> <mMinTripCount>0</mMinTripCount> <mMaxTripCount>32767</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>32773</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_304"> <mId>6</mId> <mTag>Region 2</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>113</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>7</mMinLatency> <mMaxLatency>7</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_305"> <mId>7</mId> <mTag>Region 3</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>115</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_306"> <mId>8</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>117</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="24" tracking_level="1" version="0" object_id="_307"> <states class_id="25" tracking_level="0" version="0"> <count>29</count> <item_version>0</item_version> <item class_id="26" tracking_level="1" version="0" object_id="_308"> <id>1</id> <operations class_id="27" tracking_level="0" version="0"> <count>17</count> <item_version>0</item_version> <item class_id="28" tracking_level="1" version="0" object_id="_309"> <id>6</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_310"> <id>7</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_311"> <id>8</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_312"> <id>9</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_313"> <id>10</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_314"> <id>11</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_315"> <id>12</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_316"> <id>13</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_317"> <id>14</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_318"> <id>15</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_319"> <id>16</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_320"> <id>17</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_321"> <id>18</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_322"> <id>19</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_323"> <id>20</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_324"> <id>21</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_325"> <id>23</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_326"> <id>2</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_327"> <id>24</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_328"> <id>25</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_329"> <id>26</id> <stage>7</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_330"> <id>3</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_331"> <id>26</id> <stage>6</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_332"> <id>4</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_333"> <id>26</id> <stage>5</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_334"> <id>5</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_335"> <id>26</id> <stage>4</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_336"> <id>6</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_337"> <id>26</id> <stage>3</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_338"> <id>7</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_339"> <id>26</id> <stage>2</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_340"> <id>8</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_341"> <id>26</id> <stage>1</stage> <latency>7</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_342"> <id>9</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_343"> <id>27</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_344"> <id>28</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_345"> <id>29</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_346"> <id>30</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_347"> <id>10</id> <operations> <count>16</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_348"> <id>31</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_349"> <id>32</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_350"> <id>33</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_351"> <id>34</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_352"> <id>35</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_353"> <id>36</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_354"> <id>37</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_355"> <id>38</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_356"> <id>39</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_357"> <id>41</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_358"> <id>42</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_359"> <id>43</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_360"> <id>44</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_361"> <id>45</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_362"> <id>46</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_363"> <id>47</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_364"> <id>11</id> <operations> <count>10</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_365"> <id>49</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_366"> <id>50</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_367"> <id>51</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_368"> <id>52</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_369"> <id>53</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_370"> <id>55</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_371"> <id>56</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_372"> <id>57</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_373"> <id>58</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_374"> <id>59</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_375"> <id>12</id> <operations> <count>9</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_376"> <id>61</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_377"> <id>62</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_378"> <id>63</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_379"> <id>64</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_380"> <id>65</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_381"> <id>66</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_382"> <id>67</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_383"> <id>68</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_384"> <id>69</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_385"> <id>13</id> <operations> <count>7</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_386"> <id>71</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_387"> <id>72</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_388"> <id>73</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_389"> <id>74</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_390"> <id>75</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_391"> <id>76</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_392"> <id>77</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_393"> <id>14</id> <operations> <count>14</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_394"> <id>79</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_395"> <id>80</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_396"> <id>81</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_397"> <id>82</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_398"> <id>83</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_399"> <id>84</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_400"> <id>85</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_401"> <id>90</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_402"> <id>91</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_403"> <id>92</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_404"> <id>93</id> <stage>2</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_405"> <id>95</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_406"> <id>101</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_407"> <id>102</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_408"> <id>15</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_409"> <id>93</id> <stage>1</stage> <latency>2</latency> </item> <item class_id_reference="28" object_id="_410"> <id>96</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_411"> <id>97</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_412"> <id>98</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_413"> <id>16</id> <operations> <count>2</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_414"> <id>94</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_415"> <id>99</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_416"> <id>17</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_417"> <id>100</id> <stage>5</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_418"> <id>18</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_419"> <id>100</id> <stage>4</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_420"> <id>19</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_421"> <id>100</id> <stage>3</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_422"> <id>20</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_423"> <id>100</id> <stage>2</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_424"> <id>21</id> <operations> <count>6</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_425"> <id>87</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_426"> <id>88</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_427"> <id>89</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_428"> <id>100</id> <stage>1</stage> <latency>5</latency> </item> <item class_id_reference="28" object_id="_429"> <id>103</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_430"> <id>104</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_431"> <id>22</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_432"> <id>106</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_433"> <id>23</id> <operations> <count>3</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_434"> <id>107</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_435"> <id>108</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_436"> <id>109</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_437"> <id>24</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_438"> <id>110</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_439"> <id>25</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_440"> <id>111</id> <stage>5</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_441"> <id>26</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_442"> <id>111</id> <stage>4</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_443"> <id>27</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_444"> <id>111</id> <stage>3</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_445"> <id>28</id> <operations> <count>1</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_446"> <id>111</id> <stage>2</stage> <latency>5</latency> </item> </operations> </item> <item class_id_reference="26" object_id="_447"> <id>29</id> <operations> <count>4</count> <item_version>0</item_version> <item class_id_reference="28" object_id="_448"> <id>111</id> <stage>1</stage> <latency>5</latency> </item> <item class_id_reference="28" object_id="_449"> <id>112</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_450"> <id>114</id> <stage>1</stage> <latency>1</latency> </item> <item class_id_reference="28" object_id="_451"> <id>116</id> <stage>1</stage> <latency>1</latency> </item> </operations> </item> </states> <transitions class_id="29" tracking_level="0" version="0"> <count>32</count> <item_version>0</item_version> <item class_id="30" tracking_level="1" version="0" object_id="_452"> <inState>1</inState> <outState>2</outState> <condition class_id="31" tracking_level="0" version="0"> <id>-1</id> <sop class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="34" tracking_level="0" version="0"> <first class_id="35" tracking_level="0" version="0"> <first>20</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_453"> <inState>1</inState> <outState>29</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>20</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_454"> <inState>2</inState> <outState>3</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_455"> <inState>3</inState> <outState>4</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_456"> <inState>4</inState> <outState>5</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_457"> <inState>5</inState> <outState>6</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_458"> <inState>6</inState> <outState>7</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_459"> <inState>7</inState> <outState>8</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_460"> <inState>8</inState> <outState>9</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_461"> <inState>9</inState> <outState>10</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_462"> <inState>10</inState> <outState>29</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>38</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_463"> <inState>10</inState> <outState>11</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>38</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_464"> <inState>11</inState> <outState>13</outState> <condition> <id>-1</id> <sop> <count>2</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>57</first> <second>0</second> </first> <second>1</second> </item> </item> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>51</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_465"> <inState>11</inState> <outState>12</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>2</count> <item_version>0</item_version> <item> <first> <first>51</first> <second>0</second> </first> <second>0</second> </item> <item> <first> <first>57</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_466"> <inState>12</inState> <outState>11</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_467"> <inState>13</inState> <outState>14</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_468"> <inState>22</inState> <outState>23</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_469"> <inState>23</inState> <outState>24</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_470"> <inState>24</inState> <outState>25</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_471"> <inState>25</inState> <outState>26</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_472"> <inState>26</inState> <outState>27</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_473"> <inState>27</inState> <outState>28</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_474"> <inState>28</inState> <outState>29</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_475"> <inState>15</inState> <outState>16</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_476"> <inState>16</inState> <outState>17</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_477"> <inState>17</inState> <outState>18</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_478"> <inState>18</inState> <outState>19</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_479"> <inState>19</inState> <outState>20</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_480"> <inState>20</inState> <outState>21</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_481"> <inState>21</inState> <outState>14</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>0</count> <item_version>0</item_version> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_482"> <inState>14</inState> <outState>22</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>82</first> <second>0</second> </first> <second>1</second> </item> </item> </sop> </condition> </item> <item class_id_reference="30" object_id="_483"> <inState>14</inState> <outState>15</outState> <condition> <id>-1</id> <sop> <count>1</count> <item_version>0</item_version> <item> <count>1</count> <item_version>0</item_version> <item> <first> <first>82</first> <second>0</second> </first> <second>0</second> </item> </item> </sop> </condition> </item> </transitions> </fsm> <res class_id="-1"></res> <node_label_latency class_id="37" tracking_level="0" version="0"> <count>85</count> <item_version>0</item_version> <item class_id="38" tracking_level="0" version="0"> <first>6</first> <second class_id="39" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>24</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>1</first> <second>6</second> </second> </item> <item> <first>27</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>38</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>76</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>80</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>85</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>90</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>91</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>92</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>93</first> <second> <first>13</first> <second>1</second> </second> </item> <item> <first>94</first> <second> <first>15</first> <second>0</second> </second> </item> <item> <first>95</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>96</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>97</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>98</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>99</first> <second> <first>15</first> <second>0</second> </second> </item> <item> <first>100</first> <second> <first>16</first> <second>4</second> </second> </item> <item> <first>101</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>102</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>104</first> <second> <first>20</first> <second>0</second> </second> </item> <item> <first>106</first> <second> <first>21</first> <second>0</second> </second> </item> <item> <first>107</first> <second> <first>22</first> <second>0</second> </second> </item> <item> <first>108</first> <second> <first>22</first> <second>0</second> </second> </item> <item> <first>109</first> <second> <first>22</first> <second>0</second> </second> </item> <item> <first>110</first> <second> <first>23</first> <second>0</second> </second> </item> <item> <first>111</first> <second> <first>24</first> <second>4</second> </second> </item> <item> <first>112</first> <second> <first>28</first> <second>0</second> </second> </item> <item> <first>114</first> <second> <first>28</first> <second>0</second> </second> </item> <item> <first>116</first> <second> <first>28</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="40" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="41" tracking_level="0" version="0"> <first>22</first> <second class_id="42" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>0</first> <second>9</second> </second> </item> <item> <first>48</first> <second> <first>9</first> <second>9</second> </second> </item> <item> <first>54</first> <second> <first>10</first> <second>10</second> </second> </item> <item> <first>60</first> <second> <first>10</first> <second>10</second> </second> </item> <item> <first>70</first> <second> <first>10</first> <second>11</second> </second> </item> <item> <first>78</first> <second> <first>11</first> <second>11</second> </second> </item> <item> <first>86</first> <second> <first>12</first> <second>12</second> </second> </item> <item> <first>105</first> <second> <first>12</first> <second>19</second> </second> </item> <item> <first>113</first> <second> <first>13</first> <second>20</second> </second> </item> <item> <first>115</first> <second> <first>20</first> <second>20</second> </second> </item> <item> <first>117</first> <second> <first>20</first> <second>20</second> </second> </item> </bblk_ent_exit> <regions class_id="43" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="44" tracking_level="1" version="0" object_id="_484"> <region_name>gmem_write</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>86</item> <item>105</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>8</pipe_depth> </item> </regions> <dp_fu_nodes class_id="45" tracking_level="0" version="0"> <count>70</count> <item_version>0</item_version> <item class_id="46" tracking_level="0" version="0"> <first>118</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>122</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>128</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>134</first> <second> <count>7</count> <item_version>0</item_version> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> </second> </item> <item> <first>141</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>146</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>152</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> <item> <first>158</first> <second> <count>6</count> <item_version>0</item_version> <item>98</item> <item>100</item> <item>100</item> <item>100</item> <item>100</item> <item>100</item> </second> </item> <item> <first>165</first> <second> <count>1</count> <item_version>0</item_version> <item>99</item> </second> </item> <item> <first>174</first> <second> <count>6</count> <item_version>0</item_version> <item>109</item> <item>111</item> <item>111</item> <item>111</item> <item>111</item> <item>111</item> </second> </item> <item> <first>181</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>190</first> <second> <count>1</count> <item_version>0</item_version> <item>67</item> </second> </item> <item> <first>196</first> <second> <count>3</count> <item_version>0</item_version> <item>68</item> <item>93</item> <item>93</item> </second> </item> <item> <first>202</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>213</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>224</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>234</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>244</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>251</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>261</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>265</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>271</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>277</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>280</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>287</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>291</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>295</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>301</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>306</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>309</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>312</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>315</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>321</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>325</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>331</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>337</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>342</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>345</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>348</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>356</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>362</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>368</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>372</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> <item> <first>377</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>383</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>387</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>391</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>397</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>402</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>412</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>421</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>426</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>432</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>436</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>444</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>449</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>453</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>457</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>463</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>469</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>473</first> <second> <count>1</count> <item_version>0</item_version> <item>91</item> </second> </item> <item> <first>478</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>483</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>489</first> <second> <count>1</count> <item_version>0</item_version> <item>102</item> </second> </item> <item> <first>495</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>498</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>505</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>509</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>514</first> <second> <count>1</count> <item_version>0</item_version> <item>107</item> </second> </item> <item> <first>517</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> </dp_fu_nodes> <dp_fu_nodes_expression class_id="48" tracking_level="0" version="0"> <count>57</count> <item_version>0</item_version> <item class_id="49" tracking_level="0" version="0"> <first>bytes_to_write_1_phi_fu_224</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>bytes_to_write_2_fu_368</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>bytes_to_write_fu_362</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>data_V_addr_1_gep_fu_202</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>data_V_addr_gep_fu_190</first> <second> <count>1</count> <item_version>0</item_version> <item>67</item> </second> </item> <item> <first>data_V_alloca_fu_118</first> <second> <count>1</count> <item_version>0</item_version> <item>13</item> </second> </item> <item> <first>empty_n_fu_383</first> <second> <count>1</count> <item_version>0</item_version> <item>57</item> </second> </item> <item> <first>extLd_fu_505</first> <second> <count>1</count> <item_version>0</item_version> <item>94</item> </second> </item> <item> <first>gmem_out_addr_1_fu_498</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>gmem_out_addr_2_fu_517</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> <item> <first>gmem_out_addr_fu_280</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>h1_cast_fu_453</first> <second> <count>1</count> <item_version>0</item_version> <item>81</item> </second> </item> <item> <first>h1_phi_fu_244</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>h_1_fu_377</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>h_2_fu_463</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>h_phi_fu_213</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>lhs_V_cast_fu_291</first> <second> <count>1</count> <item_version>0</item_version> <item>29</item> </second> </item> <item> <first>or_cond_fu_331</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>output_V2_sum3_cast_fu_514</first> <second> <count>1</count> <item_version>0</item_version> <item>107</item> </second> </item> <item> <first>output_V2_sum3_fu_509</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>output_V2_sum4_cast_fu_495</first> <second> <count>1</count> <item_version>0</item_version> <item>96</item> </second> </item> <item> <first>output_V2_sum4_fu_478</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>output_V2_sum_cast_fu_277</first> <second> <count>1</count> <item_version>0</item_version> <item>24</item> </second> </item> <item> <first>output_V2_sum_fu_271</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>p_neg1_pn_fu_356</first> <second> <count>1</count> <item_version>0</item_version> <item>45</item> </second> </item> <item> <first>p_neg1_pn_v_cast_cast_fu_348</first> <second> <count>1</count> <item_version>0</item_version> <item>44</item> </second> </item> <item> <first>ret_V_2_cast5_fu_306</first> <second> <count>1</count> <item_version>0</item_version> <item>32</item> </second> </item> <item> <first>ret_V_2_cast6_fu_301</first> <second> <count>1</count> <item_version>0</item_version> <item>31</item> </second> </item> <item> <first>ret_V_2_cast_fu_309</first> <second> <count>1</count> <item_version>0</item_version> <item>33</item> </second> </item> <item> <first>ret_V_cast_fu_321</first> <second> <count>1</count> <item_version>0</item_version> <item>36</item> </second> </item> <item> <first>ret_V_fu_295</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>t_V_phi_fu_234</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>tmp_10_fu_412</first> <second> <count>1</count> <item_version>0</item_version> <item>65</item> </second> </item> <item> <first>tmp_11_fu_421</first> <second> <count>1</count> <item_version>0</item_version> <item>66</item> </second> </item> <item> <first>tmp_12_fu_457</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>tmp_14_cast_fu_469</first> <second> <count>1</count> <item_version>0</item_version> <item>90</item> </second> </item> <item> <first>tmp_14_fu_432</first> <second> <count>1</count> <item_version>0</item_version> <item>73</item> </second> </item> <item> <first>tmp_15_fu_473</first> <second> <count>1</count> <item_version>0</item_version> <item>91</item> </second> </item> <item> <first>tmp_16_fu_483</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>tmp_17_cast_fu_261</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>tmp_17_fu_436</first> <second> <count>1</count> <item_version>0</item_version> <item>74</item> </second> </item> <item> <first>tmp_18_fu_444</first> <second> <count>1</count> <item_version>0</item_version> <item>75</item> </second> </item> <item> <first>tmp_19_fu_449</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>tmp_1_fu_251</first> <second> <count>1</count> <item_version>0</item_version> <item>7</item> </second> </item> <item> <first>tmp_21_fu_391</first> <second> <count>1</count> <item_version>0</item_version> <item>62</item> </second> </item> <item> <first>tmp_22_fu_387</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>tmp_2_fu_345</first> <second> <count>1</count> <item_version>0</item_version> <item>43</item> </second> </item> <item> <first>tmp_3_cast_fu_312</first> <second> <count>1</count> <item_version>0</item_version> <item>34</item> </second> </item> <item> <first>tmp_3_fu_397</first> <second> <count>1</count> <item_version>0</item_version> <item>63</item> </second> </item> <item> <first>tmp_4_fu_315</first> <second> <count>1</count> <item_version>0</item_version> <item>35</item> </second> </item> <item> <first>tmp_5_fu_402</first> <second> <count>1</count> <item_version>0</item_version> <item>64</item> </second> </item> <item> <first>tmp_6_fu_325</first> <second> <count>1</count> <item_version>0</item_version> <item>37</item> </second> </item> <item> <first>tmp_7_fu_337</first> <second> <count>1</count> <item_version>0</item_version> <item>41</item> </second> </item> <item> <first>tmp_8_fu_342</first> <second> <count>1</count> <item_version>0</item_version> <item>42</item> </second> </item> <item> <first>tmp_9_fu_426</first> <second> <count>1</count> <item_version>0</item_version> <item>72</item> </second> </item> <item> <first>tmp_fu_265</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>tmp_s_fu_372</first> <second> <count>1</count> <item_version>0</item_version> <item>51</item> </second> </item> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>12</count> <item_version>0</item_version> <item> <first>StgValue_115_store_fu_489</first> <second> <count>1</count> <item_version>0</item_version> <item>102</item> </second> </item> <item> <first>StgValue_121_write_fu_165</first> <second> <count>1</count> <item_version>0</item_version> <item>99</item> </second> </item> <item> <first>StgValue_136_write_fu_181</first> <second> <count>1</count> <item_version>0</item_version> <item>110</item> </second> </item> <item> <first>grp_readreq_fu_134</first> <second> <count>7</count> <item_version>0</item_version> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> <item>26</item> </second> </item> <item> <first>grp_writeresp_fu_158</first> <second> <count>6</count> <item_version>0</item_version> <item>98</item> <item>100</item> <item>100</item> <item>100</item> <item>100</item> <item>100</item> </second> </item> <item> <first>grp_writeresp_fu_174</first> <second> <count>6</count> <item_version>0</item_version> <item>109</item> <item>111</item> <item>111</item> <item>111</item> <item>111</item> <item>111</item> </second> </item> <item> <first>output_V_read_read_fu_122</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> <item> <first>reset_read_read_fu_128</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> <item> <first>stream_head_V_load_load_fu_287</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>stream_in_V_read_nbread_fu_146</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>stream_tail_V_read_fu_141</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>tmp_20_read_fu_152</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="50" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="51" tracking_level="0" version="0"> <first class_id="52" tracking_level="0" version="0"> <first>data_V</first> <second>0</second> </first> <second> <count>3</count> <item_version>0</item_version> <item>68</item> <item>93</item> <item>93</item> </second> </item> </dp_mem_port_nodes> <dp_reg_nodes> <count>26</count> <item_version>0</item_version> <item> <first>209</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>221</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>231</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>240</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>524</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>530</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> <item> <first>534</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>539</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>545</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>552</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>560</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>566</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>570</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>576</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>584</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>592</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>597</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>602</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>606</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>611</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>616</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>621</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>626</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>631</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>637</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>642</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> </dp_reg_nodes> <dp_regname_nodes> <count>26</count> <item_version>0</item_version> <item> <first>bytes_to_write_1_reg_221</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>bytes_to_write_2_reg_576</first> <second> <count>1</count> <item_version>0</item_version> <item>50</item> </second> </item> <item> <first>bytes_to_write_reg_570</first> <second> <count>1</count> <item_version>0</item_version> <item>46</item> </second> </item> <item> <first>data_V_addr_1_reg_611</first> <second> <count>1</count> <item_version>0</item_version> <item>92</item> </second> </item> <item> <first>data_V_load_reg_626</first> <second> <count>1</count> <item_version>0</item_version> <item>93</item> </second> </item> <item> <first>gmem_out_addr_1_reg_631</first> <second> <count>1</count> <item_version>0</item_version> <item>97</item> </second> </item> <item> <first>gmem_out_addr_2_reg_642</first> <second> <count>1</count> <item_version>0</item_version> <item>108</item> </second> </item> <item> <first>gmem_out_addr_reg_539</first> <second> <count>1</count> <item_version>0</item_version> <item>25</item> </second> </item> <item> <first>h1_reg_240</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>h_1_reg_584</first> <second> <count>1</count> <item_version>0</item_version> <item>52</item> </second> </item> <item> <first>h_2_reg_606</first> <second> <count>1</count> <item_version>0</item_version> <item>84</item> </second> </item> <item> <first>h_reg_209</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>or_cond_reg_566</first> <second> <count>1</count> <item_version>0</item_version> <item>38</item> </second> </item> <item> <first>output_V2_sum3_reg_637</first> <second> <count>1</count> <item_version>0</item_version> <item>106</item> </second> </item> <item> <first>output_V2_sum4_reg_616</first> <second> <count>1</count> <item_version>0</item_version> <item>95</item> </second> </item> <item> <first>output_V2_sum_reg_534</first> <second> <count>1</count> <item_version>0</item_version> <item>23</item> </second> </item> <item> <first>ret_V_reg_560</first> <second> <count>1</count> <item_version>0</item_version> <item>30</item> </second> </item> <item> <first>stream_head_V_load_reg_552</first> <second> <count>1</count> <item_version>0</item_version> <item>28</item> </second> </item> <item> <first>stream_tail_V_reg_545</first> <second> <count>1</count> <item_version>0</item_version> <item>27</item> </second> </item> <item> <first>t_V_reg_231</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>tmp_12_reg_602</first> <second> <count>1</count> <item_version>0</item_version> <item>82</item> </second> </item> <item> <first>tmp_16_reg_621</first> <second> <count>1</count> <item_version>0</item_version> <item>101</item> </second> </item> <item> <first>tmp_17_cast_reg_524</first> <second> <count>1</count> <item_version>0</item_version> <item>8</item> </second> </item> <item> <first>tmp_19_reg_597</first> <second> <count>1</count> <item_version>0</item_version> <item>76</item> </second> </item> <item> <first>tmp_22_reg_592</first> <second> <count>1</count> <item_version>0</item_version> <item>58</item> </second> </item> <item> <first>tmp_reg_530</first> <second> <count>1</count> <item_version>0</item_version> <item>20</item> </second> </item> </dp_regname_nodes> <dp_reg_phi> <count>4</count> <item_version>0</item_version> <item> <first>209</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>221</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>231</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> <item> <first>240</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> </dp_reg_phi> <dp_regname_phi> <count>4</count> <item_version>0</item_version> <item> <first>bytes_to_write_1_reg_221</first> <second> <count>1</count> <item_version>0</item_version> <item>71</item> </second> </item> <item> <first>h1_reg_240</first> <second> <count>1</count> <item_version>0</item_version> <item>80</item> </second> </item> <item> <first>h_reg_209</first> <second> <count>1</count> <item_version>0</item_version> <item>49</item> </second> </item> <item> <first>t_V_reg_231</first> <second> <count>1</count> <item_version>0</item_version> <item>79</item> </second> </item> </dp_regname_phi> <dp_port_io_nodes class_id="53" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="54" tracking_level="0" version="0"> <first>gmem_out</first> <second> <count>0</count> <item_version>0</item_version> </second> </item> <item> <first>output_V</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>6</item> </second> </item> </second> </item> <item> <first>reset</first> <second> <count>1</count> <item_version>0</item_version> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>19</item> </second> </item> </second> </item> <item> <first>stream_in_V</first> <second> <count>2</count> <item_version>0</item_version> <item> <first>nbread</first> <second> <count>1</count> <item_version>0</item_version> <item>56</item> </second> </item> <item> <first>read</first> <second> <count>1</count> <item_version>0</item_version> <item>61</item> </second> </item> </second> </item> </dp_port_io_nodes> <port2core class_id="55" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>1</count> <item_version>0</item_version> <item class_id="56" tracking_level="0" version="0"> <first>13</first> <second>RAM</second> </item> </node2core> </syndb> </boost_serialization>
-- Copyright 2012-2020 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. package body Classes is procedure Draw (R : Circle) is begin null; end Draw; end Classes;
package body env is function validate_variable (s : string) return boolean is begin return gnat.regexp.match(s, variable_regexp); end validate_variable; end env;
-- CE3402C.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT NEW_LINE INCREMENTS THE CURRENT PAGE BY ONE AND -- SETS THE CURRENT LINE NUMBER TO ONE WHEN THE PAGE LENGTH IS -- BOUNDED AND THE LINE NUMBER WOULD HAVE EXCEEDED THE -- MAXIMUM PAGE LENGTH. -- APPLICABILITY CRITERIA: -- THIS TEST IS APPLICABLE ONLY TO IMPLEMENTATIONS WHICH SUPPORT -- TEXT FILES. -- HISTORY: -- ABW 09/01/82 -- SPS 11/30/82 -- SPS 01/24/82 -- TBN 11/04/86 REVISED TEST TO OUTPUT A NON_APPLICABLE -- RESULT WHEN FILES ARE NOT SUPPORTED. -- DWC 08/19/87 ADDED ORIGINAL_LINE_LENGTH AND -- ORIGINAL_PAGE_LENGTH VARIABLES AND CLOSED FILE. WITH REPORT; USE REPORT; WITH TEXT_IO; USE TEXT_IO; WITH CHECK_FILE; PROCEDURE CE3402C IS INCOMPLETE : EXCEPTION; FILE : FILE_TYPE; ONE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(1)); TWO : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(2)); THREE : POSITIVE_COUNT := POSITIVE_COUNT(IDENT_INT(3)); CHAR : CHARACTER := ('C'); ITEM_CHAR : CHARACTER; ORIGINAL_LINE_LENGTH : COUNT := LINE_LENGTH; ORIGINAL_PAGE_LENGTH : COUNT := PAGE_LENGTH; BEGIN TEST ("CE3402C" , "CHECK END_OF_PAGE BEHAVIOR OF NEW_LINE"); BEGIN CREATE (FILE); EXCEPTION WHEN USE_ERROR => NOT_APPLICABLE ("USE_ERROR RAISED; TEXT CREATE"); RAISE INCOMPLETE; WHEN OTHERS => FAILED ("UNEXPECTED EXCEPTION RAISED; TEXT CREATE"); RAISE INCOMPLETE; END; SET_LINE_LENGTH (FILE,THREE); SET_PAGE_LENGTH (FILE,TWO); FOR I IN 1..6 LOOP PUT (FILE,CHAR); END LOOP; NEW_LINE (FILE); IF PAGE (FILE) /= TWO THEN FAILED ("PAGE NOT INCREMENTED BY ONE"); END IF; IF LINE (FILE) /= ONE THEN FAILED ("LINE NOT SET TO ONE"); END IF; NEW_LINE (FILE, 7); IF PAGE (FILE) /= POSITIVE_COUNT(IDENT_INT (5)) THEN FAILED ("MULTIPLE PAGES NOT CREATED BY NEW_LINE"); END IF; SET_LINE_LENGTH (FILE, ORIGINAL_LINE_LENGTH); SET_PAGE_LENGTH (FILE, ORIGINAL_PAGE_LENGTH); CHECK_FILE (FILE, "CCC#CCC#@##@##@##@#@%"); CLOSE (FILE); RESULT; EXCEPTION WHEN INCOMPLETE => RESULT; END CE3402C;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C H 4 -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Expand routines for chapter 4 constructs with Types; use Types; package Exp_Ch4 is procedure Expand_N_Allocator (N : Node_Id); procedure Expand_N_And_Then (N : Node_Id); procedure Expand_N_Case_Expression (N : Node_Id); procedure Expand_N_Explicit_Dereference (N : Node_Id); procedure Expand_N_Expression_With_Actions (N : Node_Id); procedure Expand_N_If_Expression (N : Node_Id); procedure Expand_N_In (N : Node_Id); procedure Expand_N_Indexed_Component (N : Node_Id); procedure Expand_N_Not_In (N : Node_Id); procedure Expand_N_Null (N : Node_Id); procedure Expand_N_Op_Abs (N : Node_Id); procedure Expand_N_Op_Add (N : Node_Id); procedure Expand_N_Op_And (N : Node_Id); procedure Expand_N_Op_Concat (N : Node_Id); procedure Expand_N_Op_Divide (N : Node_Id); procedure Expand_N_Op_Expon (N : Node_Id); procedure Expand_N_Op_Eq (N : Node_Id); procedure Expand_N_Op_Ge (N : Node_Id); procedure Expand_N_Op_Gt (N : Node_Id); procedure Expand_N_Op_Le (N : Node_Id); procedure Expand_N_Op_Lt (N : Node_Id); procedure Expand_N_Op_Minus (N : Node_Id); procedure Expand_N_Op_Mod (N : Node_Id); procedure Expand_N_Op_Multiply (N : Node_Id); procedure Expand_N_Op_Ne (N : Node_Id); procedure Expand_N_Op_Not (N : Node_Id); procedure Expand_N_Op_Or (N : Node_Id); procedure Expand_N_Op_Plus (N : Node_Id); procedure Expand_N_Op_Rem (N : Node_Id); procedure Expand_N_Op_Rotate_Left (N : Node_Id); procedure Expand_N_Op_Rotate_Right (N : Node_Id); procedure Expand_N_Op_Shift_Left (N : Node_Id); procedure Expand_N_Op_Shift_Right (N : Node_Id); procedure Expand_N_Op_Shift_Right_Arithmetic (N : Node_Id); procedure Expand_N_Op_Subtract (N : Node_Id); procedure Expand_N_Op_Xor (N : Node_Id); procedure Expand_N_Or_Else (N : Node_Id); procedure Expand_N_Qualified_Expression (N : Node_Id); procedure Expand_N_Quantified_Expression (N : Node_Id); procedure Expand_N_Selected_Component (N : Node_Id); procedure Expand_N_Slice (N : Node_Id); procedure Expand_N_Type_Conversion (N : Node_Id); procedure Expand_N_Unchecked_Expression (N : Node_Id); procedure Expand_N_Unchecked_Type_Conversion (N : Node_Id); function Build_Eq_Call (Typ : Entity_Id; Loc : Source_Ptr; Lhs : Node_Id; Rhs : Node_Id) return Node_Id; -- AI05-0123: Locate primitive equality for type if it exists, and build -- the corresponding call. If operation is abstract, replace call with -- an explicit raise. Return Empty if there is no primitive. -- Used in the construction of record-equality routines for records here -- and for variant records in exp_ch3.adb. These two paths are distinct -- for historical but also technical reasons: for variant records the -- constructed function includes a case statement with nested returns, -- while for records without variants only a simple expression is needed. function Expand_Record_Equality (Nod : Node_Id; Typ : Entity_Id; Lhs : Node_Id; Rhs : Node_Id; Bodies : List_Id) return Node_Id; -- Expand a record equality into an expression that compares the fields -- individually to yield the required Boolean result. Loc is the -- location for the generated nodes. Typ is the type of the record, and -- Lhs, Rhs are the record expressions to be compared, these -- expressions need not to be analyzed but have to be side-effect free. -- Bodies is a list on which to attach bodies of local functions that -- are created in the process. This is the responsibility of the caller -- to insert those bodies at the right place. Nod provides the Sloc -- value for generated code. procedure Expand_Set_Membership (N : Node_Id); -- For each choice of a set membership, we create a simple equality or -- membership test. The whole membership is rewritten connecting these -- with OR ELSE. function Integer_Promotion_Possible (N : Node_Id) return Boolean; -- Returns true if the node is a type conversion whose operand is an -- arithmetic operation on signed integers, and the base type of the -- signed integer type is smaller than Standard.Integer. In such case we -- have special circuitry in Expand_N_Type_Conversion to promote both of -- the operands to type Integer. end Exp_Ch4;
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C; use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C; procedure aaa_02if is type stringptr is access all char_array; procedure PString(s : stringptr) is begin String'Write (Text_Streams.Stream (Current_Output), To_Ada(s.all)); end; function f(i : in Integer) return Boolean is begin if i = 0 then return TRUE; end if; return FALSE; end; begin if f(4) then PString(new char_array'( To_C("true <-" & Character'Val(10) & " ->" & Character'Val(10)))); else PString(new char_array'( To_C("false <-" & Character'Val(10) & " ->" & Character'Val(10)))); end if; PString(new char_array'( To_C("small test end" & Character'Val(10)))); end;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY COMPONENTS -- -- -- -- S Y S T E M . C O M P A R E _ A R R A Y _ U N S I G N E D _ 1 6 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2009 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains functions for runtime comparisons on arrays whose -- elements are 16-bit discrete type values to be treated as unsigned. package System.Compare_Array_Unsigned_16 is -- Note: although the functions in this package are in a sense Pure, the -- package cannot be declared as Pure, since the arguments are addresses, -- not the data, and the result is not pure wrt the address values. function Compare_Array_U16 (Left : System.Address; Right : System.Address; Left_Len : Natural; Right_Len : Natural) return Integer; -- Compare the array starting at address Left of length Left_Len -- with the array starting at address Right of length Right_Len. -- The comparison is in the normal Ada semantic sense of array -- comparison. The result is -1,0,+1 for Left<Right, Left=Right, -- Left>Right respectively. This function works with 4 byte words -- if the operands are aligned on 4-byte boundaries and long enough. end System.Compare_Array_Unsigned_16;
-- This file is generated by SWIG. Please do *not* modify by hand. -- with Interfaces.C; package osmesa_c.Pointers is -- GLenum_Pointer -- type GLenum_Pointer is access all osmesa_c.GLenum; -- GLenum_Pointers -- type GLenum_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.GLenum_Pointer; -- GLint_Pointer -- type GLint_Pointer is access all osmesa_c.GLint; -- GLint_Pointers -- type GLint_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.GLint_Pointer; -- GLsizei_Pointer -- type GLsizei_Pointer is access all osmesa_c.GLsizei; -- GLsizei_Pointers -- type GLsizei_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.GLsizei_Pointer; -- GLboolean_Pointer -- type GLboolean_Pointer is access all osmesa_c.GLboolean; -- GLboolean_Pointers -- type GLboolean_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.GLboolean_Pointer; -- OSMesaContext_Pointer -- type OSMesaContext_Pointer is access all osmesa_c.OSMesaContext; -- OSMesaContext_Pointers -- type OSMesaContext_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.OSMesaContext_Pointer; -- OSMESAproc_Pointer -- type OSMESAproc_Pointer is access all osmesa_c.OSMESAproc; -- OSMESAproc_Pointers -- type OSMESAproc_Pointers is array (Interfaces.C .size_t range <>) of aliased osmesa_c.Pointers.OSMESAproc_Pointer; end osmesa_c.Pointers;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Clauses; package Program.Elements.Representation_Clauses is pragma Pure (Program.Elements.Representation_Clauses); type Representation_Clause is limited interface and Program.Elements.Clauses.Clause; type Representation_Clause_Access is access all Representation_Clause'Class with Storage_Size => 0; end Program.Elements.Representation_Clauses;
----------------------------------------------------------------------- -- ADO Mysql -- Mysql Interface -- Copyright (C) 2009, 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Interfaces.C; use Interfaces.C; with System; with Interfaces.C.Strings; package Mysql.Com is pragma Preelaborate; pragma Warnings (Off); pragma Warnings (Off, "*style*"); subtype my_socket is int; -- /usr/include/mysql/mysql.h:66:13 NAME_LEN : constant := 64; -- /usr/include/mysql/mysql_com.h:23 HOSTNAME_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:24 USERNAME_LENGTH : constant := 16; -- /usr/include/mysql/mysql_com.h:25 SERVER_VERSION_LENGTH : constant := 60; -- /usr/include/mysql/mysql_com.h:26 SQLSTATE_LENGTH : constant := 5; -- /usr/include/mysql/mysql_com.h:27 -- unsupported macro: USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2 LOCAL_HOST : aliased constant String := "localhost" & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:37 LOCAL_HOST_NAMEDPIPE : aliased constant String := "." & ASCII.NUL; -- /usr/include/mysql/mysql_com.h:38 SCRAMBLE_LENGTH : constant := 20; -- /usr/include/mysql/mysql_com.h:71 SCRAMBLE_LENGTH_323 : constant := 8; -- /usr/include/mysql/mysql_com.h:72 -- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1) -- unsupported macro: SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2) NOT_NULL_FLAG : constant := 1; -- /usr/include/mysql/mysql_com.h:78 PRI_KEY_FLAG : constant := 2; -- /usr/include/mysql/mysql_com.h:79 UNIQUE_KEY_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:80 MULTIPLE_KEY_FLAG : constant := 8; -- /usr/include/mysql/mysql_com.h:81 BLOB_FLAG : constant := 16; -- /usr/include/mysql/mysql_com.h:82 UNSIGNED_FLAG : constant := 32; -- /usr/include/mysql/mysql_com.h:83 ZEROFILL_FLAG : constant := 64; -- /usr/include/mysql/mysql_com.h:84 BINARY_FLAG : constant := 128; -- /usr/include/mysql/mysql_com.h:85 ENUM_FLAG : constant := 256; -- /usr/include/mysql/mysql_com.h:88 AUTO_INCREMENT_FLAG : constant := 512; -- /usr/include/mysql/mysql_com.h:89 TIMESTAMP_FLAG : constant := 1024; -- /usr/include/mysql/mysql_com.h:90 SET_FLAG : constant := 2048; -- /usr/include/mysql/mysql_com.h:91 NO_DEFAULT_VALUE_FLAG : constant := 4096; -- /usr/include/mysql/mysql_com.h:92 NUM_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:93 PART_KEY_FLAG : constant := 16384; -- /usr/include/mysql/mysql_com.h:94 GROUP_FLAG : constant := 32768; -- /usr/include/mysql/mysql_com.h:95 UNIQUE_FLAG : constant := 65536; -- /usr/include/mysql/mysql_com.h:96 BINCMP_FLAG : constant := 131072; -- /usr/include/mysql/mysql_com.h:97 REFRESH_GRANT : constant := 1; -- /usr/include/mysql/mysql_com.h:99 REFRESH_LOG : constant := 2; -- /usr/include/mysql/mysql_com.h:100 REFRESH_TABLES : constant := 4; -- /usr/include/mysql/mysql_com.h:101 REFRESH_HOSTS : constant := 8; -- /usr/include/mysql/mysql_com.h:102 REFRESH_STATUS : constant := 16; -- /usr/include/mysql/mysql_com.h:103 REFRESH_THREADS : constant := 32; -- /usr/include/mysql/mysql_com.h:104 REFRESH_SLAVE : constant := 64; -- /usr/include/mysql/mysql_com.h:105 REFRESH_MASTER : constant := 128; -- /usr/include/mysql/mysql_com.h:107 REFRESH_READ_LOCK : constant := 16384; -- /usr/include/mysql/mysql_com.h:111 REFRESH_FAST : constant := 32768; -- /usr/include/mysql/mysql_com.h:112 REFRESH_QUERY_CACHE : constant := 65536; -- /usr/include/mysql/mysql_com.h:115 REFRESH_QUERY_CACHE_FREE : constant := 16#20000#; -- /usr/include/mysql/mysql_com.h:116 REFRESH_DES_KEY_FILE : constant := 16#40000#; -- /usr/include/mysql/mysql_com.h:117 REFRESH_USER_RESOURCES : constant := 16#80000#; -- /usr/include/mysql/mysql_com.h:118 CLIENT_LONG_PASSWORD : constant := 1; -- /usr/include/mysql/mysql_com.h:120 CLIENT_FOUND_ROWS : constant := 2; -- /usr/include/mysql/mysql_com.h:121 CLIENT_LONG_FLAG : constant := 4; -- /usr/include/mysql/mysql_com.h:122 CLIENT_CONNECT_WITH_DB : constant := 8; -- /usr/include/mysql/mysql_com.h:123 CLIENT_NO_SCHEMA : constant := 16; -- /usr/include/mysql/mysql_com.h:124 CLIENT_COMPRESS : constant := 32; -- /usr/include/mysql/mysql_com.h:125 CLIENT_ODBC : constant := 64; -- /usr/include/mysql/mysql_com.h:126 CLIENT_LOCAL_FILES : constant := 128; -- /usr/include/mysql/mysql_com.h:127 CLIENT_IGNORE_SPACE : constant := 256; -- /usr/include/mysql/mysql_com.h:128 CLIENT_PROTOCOL_41 : constant := 512; -- /usr/include/mysql/mysql_com.h:129 CLIENT_INTERACTIVE : constant := 1024; -- /usr/include/mysql/mysql_com.h:130 CLIENT_SSL : constant := 2048; -- /usr/include/mysql/mysql_com.h:131 CLIENT_IGNORE_SIGPIPE : constant := 4096; -- /usr/include/mysql/mysql_com.h:132 CLIENT_TRANSACTIONS : constant := 8192; -- /usr/include/mysql/mysql_com.h:133 CLIENT_RESERVED : constant := 16384; -- /usr/include/mysql/mysql_com.h:134 CLIENT_SECURE_CONNECTION : constant := 32768; -- /usr/include/mysql/mysql_com.h:135 CLIENT_MULTI_STATEMENTS : constant := (1 ** 16); -- /usr/include/mysql/mysql_com.h:136 CLIENT_MULTI_RESULTS : constant := (1 ** 17); -- /usr/include/mysql/mysql_com.h:137 CLIENT_SSL_VERIFY_SERVER_CERT : constant := (1 ** 30); -- /usr/include/mysql/mysql_com.h:139 CLIENT_REMEMBER_OPTIONS : constant := (1 ** 31); -- /usr/include/mysql/mysql_com.h:140 SERVER_STATUS_IN_TRANS : constant := 1; -- /usr/include/mysql/mysql_com.h:142 SERVER_STATUS_AUTOCOMMIT : constant := 2; -- /usr/include/mysql/mysql_com.h:143 SERVER_MORE_RESULTS_EXISTS : constant := 8; -- /usr/include/mysql/mysql_com.h:144 SERVER_QUERY_NO_GOOD_INDEX_USED : constant := 16; -- /usr/include/mysql/mysql_com.h:145 SERVER_QUERY_NO_INDEX_USED : constant := 32; -- /usr/include/mysql/mysql_com.h:146 SERVER_STATUS_CURSOR_EXISTS : constant := 64; -- /usr/include/mysql/mysql_com.h:152 SERVER_STATUS_LAST_ROW_SENT : constant := 128; -- /usr/include/mysql/mysql_com.h:157 SERVER_STATUS_DB_DROPPED : constant := 256; -- /usr/include/mysql/mysql_com.h:158 SERVER_STATUS_NO_BACKSLASH_ESCAPES : constant := 512; -- /usr/include/mysql/mysql_com.h:159 MYSQL_ERRMSG_SIZE : constant := 512; -- /usr/include/mysql/mysql_com.h:161 NET_READ_TIMEOUT : constant := 30; -- /usr/include/mysql/mysql_com.h:162 NET_WRITE_TIMEOUT : constant := 60; -- /usr/include/mysql/mysql_com.h:163 -- unsupported macro: NET_WAIT_TIMEOUT 8*60*60 ONLY_KILL_QUERY : constant := 1; -- /usr/include/mysql/mysql_com.h:166 MAX_TINYINT_WIDTH : constant := 3; -- /usr/include/mysql/mysql_com.h:171 MAX_SMALLINT_WIDTH : constant := 5; -- /usr/include/mysql/mysql_com.h:172 MAX_MEDIUMINT_WIDTH : constant := 8; -- /usr/include/mysql/mysql_com.h:173 MAX_INT_WIDTH : constant := 10; -- /usr/include/mysql/mysql_com.h:174 MAX_BIGINT_WIDTH : constant := 20; -- /usr/include/mysql/mysql_com.h:175 MAX_CHAR_WIDTH : constant := 255; -- /usr/include/mysql/mysql_com.h:176 MAX_BLOB_WIDTH : constant := 8192; -- /usr/include/mysql/mysql_com.h:177 -- unsupported macro: packet_error (~(unsigned long) 0) -- unsupported macro: CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS -- unsupported macro: FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL -- unsupported macro: FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL -- unsupported macro: FIELD_TYPE_TINY MYSQL_TYPE_TINY -- unsupported macro: FIELD_TYPE_SHORT MYSQL_TYPE_SHORT -- unsupported macro: FIELD_TYPE_LONG MYSQL_TYPE_LONG -- unsupported macro: FIELD_TYPE_FLOAT MYSQL_TYPE_FLOAT -- unsupported macro: FIELD_TYPE_DOUBLE MYSQL_TYPE_DOUBLE -- unsupported macro: FIELD_TYPE_NULL MYSQL_TYPE_NULL -- unsupported macro: FIELD_TYPE_TIMESTAMP MYSQL_TYPE_TIMESTAMP -- unsupported macro: FIELD_TYPE_LONGLONG MYSQL_TYPE_LONGLONG -- unsupported macro: FIELD_TYPE_INT24 MYSQL_TYPE_INT24 -- unsupported macro: FIELD_TYPE_DATE MYSQL_TYPE_DATE -- unsupported macro: FIELD_TYPE_TIME MYSQL_TYPE_TIME -- unsupported macro: FIELD_TYPE_DATETIME MYSQL_TYPE_DATETIME -- unsupported macro: FIELD_TYPE_YEAR MYSQL_TYPE_YEAR -- unsupported macro: FIELD_TYPE_NEWDATE MYSQL_TYPE_NEWDATE -- unsupported macro: FIELD_TYPE_ENUM MYSQL_TYPE_ENUM -- unsupported macro: FIELD_TYPE_SET MYSQL_TYPE_SET -- unsupported macro: FIELD_TYPE_TINY_BLOB MYSQL_TYPE_TINY_BLOB -- unsupported macro: FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB -- unsupported macro: FIELD_TYPE_LONG_BLOB MYSQL_TYPE_LONG_BLOB -- unsupported macro: FIELD_TYPE_BLOB MYSQL_TYPE_BLOB -- unsupported macro: FIELD_TYPE_VAR_STRING MYSQL_TYPE_VAR_STRING -- unsupported macro: FIELD_TYPE_STRING MYSQL_TYPE_STRING -- unsupported macro: FIELD_TYPE_CHAR MYSQL_TYPE_TINY -- unsupported macro: FIELD_TYPE_INTERVAL MYSQL_TYPE_ENUM -- unsupported macro: FIELD_TYPE_GEOMETRY MYSQL_TYPE_GEOMETRY -- unsupported macro: FIELD_TYPE_BIT MYSQL_TYPE_BIT -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_CONNECT (unsigned char)(1 << 0) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_TRANS (unsigned char)(1 << 1) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2) -- unsupported macro: MYSQL_SHUTDOWN_KILLABLE_UPDATE (unsigned char)(1 << 3) -- arg-macro: function net_new_transaction (net) -- return (net).pkt_nr:=0; NET_HEADER_SIZE : constant := 4; -- /usr/include/mysql/mysql_com.h:402 COMP_HEADER_SIZE : constant := 3; -- /usr/include/mysql/mysql_com.h:403 -- unsupported macro: NULL_LENGTH ((unsigned long) ~0) MYSQL_STMT_HEADER : constant := 4; -- /usr/include/mysql/mysql_com.h:464 MYSQL_LONG_DATA_HEADER : constant := 6; -- /usr/include/mysql/mysql_com.h:465 -- Copyright (C) 2000 MySQL AB -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; version 2 of the License. -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --** Common definition between mysql server & client -- -- USER_HOST_BUFF_SIZE -- length of string buffer, that is enough to contain -- username and hostname parts of the user identifier with trailing zero in -- MySQL standard format: -- user_name_part@host_name_part\0 -- -- You should add new commands to the end of this list, otherwise old -- servers won't be able to handle them as 'unsupported'. -- subtype enum_server_command is unsigned; COM_SLEEP : constant enum_server_command := 0; COM_QUIT : constant enum_server_command := 1; COM_INIT_DB : constant enum_server_command := 2; COM_QUERY : constant enum_server_command := 3; COM_FIELD_LIST : constant enum_server_command := 4; COM_CREATE_DB : constant enum_server_command := 5; COM_DROP_DB : constant enum_server_command := 6; COM_REFRESH : constant enum_server_command := 7; COM_SHUTDOWN : constant enum_server_command := 8; COM_STATISTICS : constant enum_server_command := 9; COM_PROCESS_INFO : constant enum_server_command := 10; COM_CONNECT : constant enum_server_command := 11; COM_PROCESS_KILL : constant enum_server_command := 12; COM_DEBUG : constant enum_server_command := 13; COM_PING : constant enum_server_command := 14; COM_TIME : constant enum_server_command := 15; COM_DELAYED_INSERT : constant enum_server_command := 16; COM_CHANGE_USER : constant enum_server_command := 17; COM_BINLOG_DUMP : constant enum_server_command := 18; COM_TABLE_DUMP : constant enum_server_command := 19; COM_CONNECT_OUT : constant enum_server_command := 20; COM_REGISTER_SLAVE : constant enum_server_command := 21; COM_STMT_PREPARE : constant enum_server_command := 22; COM_STMT_EXECUTE : constant enum_server_command := 23; COM_STMT_SEND_LONG_DATA : constant enum_server_command := 24; COM_STMT_CLOSE : constant enum_server_command := 25; COM_STMT_RESET : constant enum_server_command := 26; COM_SET_OPTION : constant enum_server_command := 27; COM_STMT_FETCH : constant enum_server_command := 28; COM_END : constant enum_server_command := 29; -- /usr/include/mysql/mysql_com.h:52:1 -- don't forget to update const char *command_name[] in sql_parse.cc -- Must be last -- Length of random string sent by server on handshake; this is also length of -- obfuscated password, recieved from client -- -- length of password stored in the db: new passwords are preceeded with '*' -- The following are only sent to new clients -- The following can't be set with mysql_refresh() -- RESET (remove all queries) from query cache -- The server was able to fulfill the clients request and opened a -- read-only non-scrollable cursor for a query. This flag comes -- in reply to COM_STMT_EXECUTE and COM_STMT_FETCH commands. -- -- This flag is sent when a read-only cursor is exhausted, in reply to -- COM_STMT_FETCH command. -- -- Only C -- skipped empty struct st_vio -- skipped empty struct Vio type anon1416_anon1442_array is array (0 .. 511) of aliased char; type anon1416_anon1443_array is array (0 .. 5) of aliased char; type st_net is record the_vio : System.Address; -- /usr/include/mysql/mysql_com.h:181:8 buff : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:18 buff_end : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:24 write_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:34 read_pos : access unsigned_char; -- /usr/include/mysql/mysql_com.h:182:45 fd : aliased my_socket; -- /usr/include/mysql/mysql_com.h:183:13 max_packet : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:17 max_packet_size : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:184:28 pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:16 compress_pkt_nr : aliased unsigned; -- /usr/include/mysql/mysql_com.h:185:23 write_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:16 read_timeout : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:31 retry_count : aliased unsigned; -- /usr/include/mysql/mysql_com.h:186:45 fcntl : aliased int; -- /usr/include/mysql/mysql_com.h:187:7 compress : aliased char; -- /usr/include/mysql/mysql_com.h:188:11 remain_in_buf : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:17 length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:31 buf_length : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:39 where_b : aliased unsigned_long; -- /usr/include/mysql/mysql_com.h:194:51 return_status : access unsigned; -- /usr/include/mysql/mysql_com.h:195:17 reading_or_writing : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:196:17 save_char : aliased char; -- /usr/include/mysql/mysql_com.h:197:8 no_send_ok : aliased char; -- /usr/include/mysql/mysql_com.h:198:11 no_send_eof : aliased char; -- /usr/include/mysql/mysql_com.h:199:11 no_send_error : aliased char; -- /usr/include/mysql/mysql_com.h:204:11 last_error : aliased anon1416_anon1442_array; -- /usr/include/mysql/mysql_com.h:210:8 sqlstate : aliased anon1416_anon1443_array; -- /usr/include/mysql/mysql_com.h:210:39 last_errno : aliased unsigned; -- /usr/include/mysql/mysql_com.h:211:16 error : aliased unsigned_char; -- /usr/include/mysql/mysql_com.h:212:17 query_cache_query : Interfaces.C.Strings.chars_ptr; -- mysql_mysql_h.gptr; -- /usr/include/mysql/mysql_com.h:218:8 report_error : aliased char; -- /usr/include/mysql/mysql_com.h:220:11 return_errno : aliased char; -- /usr/include/mysql/mysql_com.h:221:11 end record; pragma Convention (C, st_net); -- /usr/include/mysql/mysql_com.h:179:16 -- For Perl DBI/dbd -- The following variable is set if we are doing several queries in one -- command ( as in LOAD TABLE ... FROM MASTER ), -- and do not want to confuse the client with OK at the wrong time -- -- For SPs and other things that do multiple stmts -- For SPs' first version read-only cursors -- Set if OK packet is already sent, and we do not need to send error -- messages -- -- Pointer to query object in query cache, do not equal NULL (0) for -- queries in cache that have not stored its results yet -- -- 'query_cache_query' should be accessed only via query cache -- functions and methods to maintain proper locking. -- -- We should report error (we have unreported error) subtype NET is st_net; subtype enum_field_types is unsigned; MYSQL_TYPE_DECIMAL : constant enum_field_types := 0; MYSQL_TYPE_TINY : constant enum_field_types := 1; MYSQL_TYPE_SHORT : constant enum_field_types := 2; MYSQL_TYPE_LONG : constant enum_field_types := 3; MYSQL_TYPE_FLOAT : constant enum_field_types := 4; MYSQL_TYPE_DOUBLE : constant enum_field_types := 5; MYSQL_TYPE_NULL : constant enum_field_types := 6; MYSQL_TYPE_TIMESTAMP : constant enum_field_types := 7; MYSQL_TYPE_LONGLONG : constant enum_field_types := 8; MYSQL_TYPE_INT24 : constant enum_field_types := 9; MYSQL_TYPE_DATE : constant enum_field_types := 10; MYSQL_TYPE_TIME : constant enum_field_types := 11; MYSQL_TYPE_DATETIME : constant enum_field_types := 12; MYSQL_TYPE_YEAR : constant enum_field_types := 13; MYSQL_TYPE_NEWDATE : constant enum_field_types := 14; MYSQL_TYPE_VARCHAR : constant enum_field_types := 15; MYSQL_TYPE_BIT : constant enum_field_types := 16; MYSQL_TYPE_NEWDECIMAL : constant enum_field_types := 246; MYSQL_TYPE_ENUM : constant enum_field_types := 247; MYSQL_TYPE_SET : constant enum_field_types := 248; MYSQL_TYPE_TINY_BLOB : constant enum_field_types := 249; MYSQL_TYPE_MEDIUM_BLOB : constant enum_field_types := 250; MYSQL_TYPE_LONG_BLOB : constant enum_field_types := 251; MYSQL_TYPE_BLOB : constant enum_field_types := 252; MYSQL_TYPE_VAR_STRING : constant enum_field_types := 253; MYSQL_TYPE_STRING : constant enum_field_types := 254; MYSQL_TYPE_GEOMETRY : constant enum_field_types := 255; -- /usr/include/mysql/mysql_com.h:226:6 -- For backward compatibility -- Shutdown/kill enums and constants -- Bits for THD::killable. subtype mysql_enum_shutdown_level is unsigned; SHUTDOWN_DEFAULT : constant mysql_enum_shutdown_level := 0; SHUTDOWN_WAIT_CONNECTIONS : constant mysql_enum_shutdown_level := 1; SHUTDOWN_WAIT_TRANSACTIONS : constant mysql_enum_shutdown_level := 2; SHUTDOWN_WAIT_UPDATES : constant mysql_enum_shutdown_level := 8; SHUTDOWN_WAIT_ALL_BUFFERS : constant mysql_enum_shutdown_level := 16; SHUTDOWN_WAIT_CRITICAL_BUFFERS : constant mysql_enum_shutdown_level := 17; KILL_QUERY : constant mysql_enum_shutdown_level := 254; KILL_CONNECTION : constant mysql_enum_shutdown_level := 255; -- /usr/include/mysql/mysql_com.h:288:6 -- We want levels to be in growing order of hardness (because we use number -- comparisons). Note that DEFAULT does not respect the growing property, but -- it's ok. -- -- wait for existing connections to finish -- wait for existing trans to finish -- wait for existing updates to finish (=> no partial MyISAM update) -- flush InnoDB buffers and other storage engines' buffers -- don't flush InnoDB buffers, flush other storage engines' buffers -- Now the 2 levels of the KILL command subtype enum_cursor_type is unsigned; CURSOR_TYPE_NO_CURSOR : constant enum_cursor_type := 0; CURSOR_TYPE_READ_ONLY : constant enum_cursor_type := 1; CURSOR_TYPE_FOR_UPDATE : constant enum_cursor_type := 2; CURSOR_TYPE_SCROLLABLE : constant enum_cursor_type := 4; -- /usr/include/mysql/mysql_com.h:314:1 -- options for mysql_set_option subtype enum_mysql_set_option is unsigned; MYSQL_OPTION_MULTI_STATEMENTS_ON : constant enum_mysql_set_option := 0; MYSQL_OPTION_MULTI_STATEMENTS_OFF : constant enum_mysql_set_option := 1; -- /usr/include/mysql/mysql_com.h:324:1 function my_net_init (arg1 : access st_net; arg2 : System.Address) return char; -- /usr/include/mysql/mysql_com.h:335:9 pragma Import (C, my_net_init, "my_net_init"); procedure my_net_local_init (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:336:6 pragma Import (C, my_net_local_init, "my_net_local_init"); procedure net_end (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:337:6 pragma Import (C, net_end, "net_end"); procedure net_clear (arg1 : access st_net); -- /usr/include/mysql/mysql_com.h:338:6 pragma Import (C, net_clear, "net_clear"); function net_realloc (arg1 : access st_net; arg2 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:339:9 pragma Import (C, net_realloc, "net_realloc"); function net_flush (arg1 : access st_net) return char; -- /usr/include/mysql/mysql_com.h:340:9 pragma Import (C, net_flush, "net_flush"); function my_net_write (arg1 : access st_net; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:341:9 pragma Import (C, my_net_write, "my_net_write"); function net_write_command (arg1 : access st_net; arg2 : unsigned_char; arg3 : Interfaces.C.Strings.chars_ptr; arg4 : unsigned_long; arg5 : Interfaces.C.Strings.chars_ptr; arg6 : unsigned_long) return char; -- /usr/include/mysql/mysql_com.h:342:9 pragma Import (C, net_write_command, "net_write_command"); function net_real_write (arg1 : access st_net; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned_long) return int; -- /usr/include/mysql/mysql_com.h:345:5 pragma Import (C, net_real_write, "net_real_write"); function my_net_read (arg1 : access st_net) return unsigned_long; -- /usr/include/mysql/mysql_com.h:346:15 pragma Import (C, my_net_read, "my_net_read"); -- The following function is not meant for normal usage -- Currently it's used internally by manager.c -- -- skipped empty struct sockaddr function my_connect (arg1 : my_socket; arg2 : System.Address; arg3 : unsigned; arg4 : unsigned) return int; -- /usr/include/mysql/mysql_com.h:358:5 pragma Import (C, my_connect, "my_connect"); type rand_struct is record seed1 : aliased unsigned_long; seed2 : aliased unsigned_long; max_value : aliased unsigned_long; max_value_dbl : aliased double; end record; pragma Convention (C, rand_struct); -- The following is for user defined functions subtype Item_result is unsigned; STRING_RESULT : constant Item_result := 0; REAL_RESULT : constant Item_result := 1; INT_RESULT : constant Item_result := 2; ROW_RESULT : constant Item_result := 3; DECIMAL_RESULT : constant Item_result := 4; -- Number of arguments type st_udf_args is record arg_count : aliased unsigned; arg_type : access Item_result; args : System.Address; lengths : access unsigned_long; maybe_null : Interfaces.C.Strings.chars_ptr; attributes : System.Address; attribute_lengths : access unsigned_long; end record; pragma Convention (C, st_udf_args); -- Pointer to item_results -- Pointer to argument -- Length of string arguments -- Set to 1 for all maybe_null args -- Pointer to attribute name -- Length of attribute arguments subtype UDF_ARGS is st_udf_args; -- This holds information about the result -- 1 if function can return NULL type st_udf_init is record maybe_null : aliased char; decimals : aliased unsigned; max_length : aliased unsigned_long; ptr : Interfaces.C.Strings.chars_ptr; const_item : aliased char; end record; pragma Convention (C, st_udf_init); -- for real functions -- For string functions -- free pointer for function data -- 1 if function always returns the same value subtype UDF_INIT is st_udf_init; -- -- TODO: add a notion for determinism of the UDF. -- See Item_udf_func::update_used_tables () -- -- Constants when using compression -- Prototypes to password functions -- These functions are used for authentication by client and server and -- implemented in sql/password.c -- procedure randominit (arg1 : access rand_struct; arg2 : unsigned_long; arg3 : unsigned_long); pragma Import (C, randominit, "randominit"); function my_rnd (arg1 : access rand_struct) return double; pragma Import (C, my_rnd, "my_rnd"); procedure create_random_string (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : unsigned; arg3 : access rand_struct); pragma Import (C, create_random_string, "create_random_string"); procedure hash_password (arg1 : access unsigned_long; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned); pragma Import (C, hash_password, "hash_password"); procedure Make_Scrambled_Password_323 (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, make_scrambled_password_323, "make_scrambled_password_323"); procedure scramble_323 (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr); pragma Import (C, scramble_323, "scramble_323"); function check_scramble_323 (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : access unsigned_long) return char; pragma Import (C, check_scramble_323, "check_scramble_323"); procedure Get_Salt_From_Password_323 (Arg1 : access Unsigned_Long; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, get_salt_from_password_323, "get_salt_from_password_323"); procedure Make_Password_From_Salt_323 (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : access unsigned_long); pragma Import (C, make_password_from_salt_323, "make_password_from_salt_323"); procedure Make_Scrambled_Password (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, make_scrambled_password, "make_scrambled_password"); procedure scramble (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr); pragma Import (C, scramble, "scramble"); function check_scramble (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : access unsigned_char) return char; pragma Import (C, check_scramble, "check_scramble"); procedure Get_Salt_From_Password (Arg1 : access Unsigned_Char; arg2 : Interfaces.C.Strings.chars_ptr); pragma Import (C, get_salt_from_password, "get_salt_from_password"); procedure Make_Password_From_Salt (Arg1 : Interfaces.C.Strings.chars_ptr; arg2 : access unsigned_char); pragma Import (C, make_password_from_salt, "make_password_from_salt"); function octet2hex (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : unsigned) return Interfaces.C.Strings.chars_ptr; pragma Import (C, octet2hex, "octet2hex"); -- end of password.c function Get_Tty_Password (Arg1 : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; pragma Import (C, get_tty_password, "get_tty_password"); function mysql_errno_to_sqlstate (arg1 : unsigned) return Interfaces.C.Strings.chars_ptr; pragma Import (C, mysql_errno_to_sqlstate, "mysql_errno_to_sqlstate"); -- Some other useful functions function my_init return char; pragma Import (C, my_init, "my_init"); function modify_defaults_file (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : Interfaces.C.Strings.chars_ptr; arg3 : Interfaces.C.Strings.chars_ptr; arg4 : Interfaces.C.Strings.chars_ptr; arg5 : int) return int; pragma Import (C, modify_defaults_file, "modify_defaults_file"); function load_defaults (arg1 : Interfaces.C.Strings.chars_ptr; arg2 : System.Address; arg3 : access int; arg4 : System.Address) return int; pragma Import (C, load_defaults, "load_defaults"); function my_thread_init return char; pragma Import (C, my_thread_init, "my_thread_init"); procedure my_thread_end; pragma Import (C, my_thread_end, "my_thread_end"); end Mysql.Com ;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.INDEFINITE_HASHED_SETS -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2019, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the contents of the part following the private keyword. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- This unit was originally developed by Matthew J Heaney. -- ------------------------------------------------------------------------------ with Ada.Iterator_Interfaces; private with Ada.Containers.Hash_Tables; with Ada.Containers.Helpers; private with Ada.Streams; private with Ada.Finalization; generic type Element_Type (<>) is private; with function Hash (Element : Element_Type) return Hash_Type; with function Equivalent_Elements (Left, Right : Element_Type) return Boolean; with function "=" (Left, Right : Element_Type) return Boolean is <>; package Ada.Containers.Indefinite_Hashed_Sets is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; pragma Remote_Types; type Set is tagged private with Constant_Indexing => Constant_Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type; pragma Preelaborable_Initialization (Set); type Cursor is private; pragma Preelaborable_Initialization (Cursor); Empty_Set : constant Set; -- Set objects declared without an initialization expression are -- initialized to the value Empty_Set. No_Element : constant Cursor; -- Cursor objects declared without an initialization expression are -- initialized to the value No_Element. function Has_Element (Position : Cursor) return Boolean; -- Equivalent to Position /= No_Element package Set_Iterator_Interfaces is new Ada.Iterator_Interfaces (Cursor, Has_Element); function "=" (Left, Right : Set) return Boolean; -- For each element in Left, set equality attempts to find the equal -- element in Right; if a search fails, then set equality immediately -- returns False. The search works by calling Hash to find the bucket in -- the Right set that corresponds to the Left element. If the bucket is -- non-empty, the search calls the generic formal element equality operator -- to compare the element (in Left) to the element of each node in the -- bucket (in Right); the search terminates when a matching node in the -- bucket is found, or the nodes in the bucket are exhausted. (Note that -- element equality is called here, not Equivalent_Elements. Set equality -- is the only operation in which element equality is used. Compare set -- equality to Equivalent_Sets, which does call Equivalent_Elements.) function Equivalent_Sets (Left, Right : Set) return Boolean; -- Similar to set equality, with the difference that the element in Left is -- compared to the elements in Right using the generic formal -- Equivalent_Elements operation instead of element equality. function To_Set (New_Item : Element_Type) return Set; -- Constructs a singleton set comprising New_Element. To_Set calls Hash to -- determine the bucket for New_Item. function Capacity (Container : Set) return Count_Type; -- Returns the current capacity of the set. Capacity is the maximum length -- before which rehashing in guaranteed not to occur. procedure Reserve_Capacity (Container : in out Set; Capacity : Count_Type); -- Adjusts the current capacity, by allocating a new buckets array. If the -- requested capacity is less than the current capacity, then the capacity -- is contracted (to a value not less than the current length). If the -- requested capacity is greater than the current capacity, then the -- capacity is expanded (to a value not less than what is requested). In -- either case, the nodes are rehashed from the old buckets array onto the -- new buckets array (Hash is called once for each existing element in -- order to compute the new index), and then the old buckets array is -- deallocated. function Length (Container : Set) return Count_Type; -- Returns the number of items in the set function Is_Empty (Container : Set) return Boolean; -- Equivalent to Length (Container) = 0 procedure Clear (Container : in out Set); -- Removes all of the items from the set function Element (Position : Cursor) return Element_Type; -- Returns the element of the node designated by the cursor procedure Replace_Element (Container : in out Set; Position : Cursor; New_Item : Element_Type); -- If New_Item is equivalent (as determined by calling Equivalent_Elements) -- to the element of the node designated by Position, then New_Element is -- assigned to that element. Otherwise, it calls Hash to determine the -- bucket for New_Item. If the bucket is not empty, then it calls -- Equivalent_Elements for each node in that bucket to determine whether -- New_Item is equivalent to an element in that bucket. If -- Equivalent_Elements returns True then Program_Error is raised (because -- an element may appear only once in the set); otherwise, New_Item is -- assigned to the node designated by Position, and the node is moved to -- its new bucket. procedure Query_Element (Position : Cursor; Process : not null access procedure (Element : Element_Type)); -- Calls Process with the element (having only a constant view) of the node -- designated by the cursor. type Constant_Reference_Type (Element : not null access constant Element_Type) is private with Implicit_Dereference => Element; function Constant_Reference (Container : aliased Set; Position : Cursor) return Constant_Reference_Type; pragma Inline (Constant_Reference); procedure Assign (Target : in out Set; Source : Set); function Copy (Source : Set; Capacity : Count_Type := 0) return Set; procedure Move (Target : in out Set; Source : in out Set); -- Clears Target (if it's not empty), and then moves (not copies) the -- buckets array and nodes from Source to Target. procedure Insert (Container : in out Set; New_Item : Element_Type; Position : out Cursor; Inserted : out Boolean); -- Conditionally inserts New_Item into the set. If New_Item is already in -- the set, then Inserted returns False and Position designates the node -- containing the existing element (which is not modified). If New_Item is -- not already in the set, then Inserted returns True and Position -- designates the newly-inserted node containing New_Item. The search for -- an existing element works as follows. Hash is called to determine -- New_Item's bucket; if the bucket is non-empty, then Equivalent_Elements -- is called to compare New_Item to the element of each node in that -- bucket. If the bucket is empty, or there were no equivalent elements in -- the bucket, the search "fails" and the New_Item is inserted in the set -- (and Inserted returns True); otherwise, the search "succeeds" (and -- Inserted returns False). procedure Insert (Container : in out Set; New_Item : Element_Type); -- Attempts to insert New_Item into the set, performing the usual insertion -- search (which involves calling both Hash and Equivalent_Elements); if -- the search succeeds (New_Item is equivalent to an element already in the -- set, and so was not inserted), then this operation raises -- Constraint_Error. (This version of Insert is similar to Replace, but -- having the opposite exception behavior. It is intended for use when you -- want to assert that the item is not already in the set.) procedure Include (Container : in out Set; New_Item : Element_Type); -- Attempts to insert New_Item into the set. If an element equivalent to -- New_Item is already in the set (the insertion search succeeded, and -- hence New_Item was not inserted), then the value of New_Item is assigned -- to the existing element. (This insertion operation only raises an -- exception if cursor tampering occurs. It is intended for use when you -- want to insert the item in the set, and you don't care whether an -- equivalent element is already present.) procedure Replace (Container : in out Set; New_Item : Element_Type); -- Searches for New_Item in the set; if the search fails (because an -- equivalent element was not in the set), then it raises -- Constraint_Error. Otherwise, the existing element is assigned the value -- New_Item. (This is similar to Insert, but with the opposite exception -- behavior. It is intended for use when you want to assert that the item -- is already in the set.) procedure Exclude (Container : in out Set; Item : Element_Type); -- Searches for Item in the set, and if found, removes its node from the -- set and then deallocates it. The search works as follows. The operation -- calls Hash to determine the item's bucket; if the bucket is not empty, -- it calls Equivalent_Elements to compare Item to the element of each node -- in the bucket. (This is the deletion analog of Include. It is intended -- for use when you want to remove the item from the set, but don't care -- whether the item is already in the set.) procedure Delete (Container : in out Set; Item : Element_Type); -- Searches for Item in the set (which involves calling both Hash and -- Equivalent_Elements). If the search fails, then the operation raises -- Constraint_Error. Otherwise it removes the node from the set and then -- deallocates it. (This is the deletion analog of non-conditional -- Insert. It is intended for use when you want to assert that the item is -- already in the set.) procedure Delete (Container : in out Set; Position : in out Cursor); -- Removes the node designated by Position from the set, and then -- deallocates the node. The operation calls Hash to determine the bucket, -- and then compares Position to each node in the bucket until there's a -- match (it does not call Equivalent_Elements). procedure Union (Target : in out Set; Source : Set); -- The operation first calls Reserve_Capacity if the current capacity is -- less than the sum of the lengths of Source and Target. It then iterates -- over the Source set, and conditionally inserts each element into Target. function Union (Left, Right : Set) return Set; -- The operation first copies the Left set to the result, and then iterates -- over the Right set to conditionally insert each element into the result. function "or" (Left, Right : Set) return Set renames Union; procedure Intersection (Target : in out Set; Source : Set); -- Iterates over the Target set (calling First and Next), calling Find to -- determine whether the element is in Source. If an equivalent element is -- not found in Source, the element is deleted from Target. function Intersection (Left, Right : Set) return Set; -- Iterates over the Left set, calling Find to determine whether the -- element is in Right. If an equivalent element is found, it is inserted -- into the result set. function "and" (Left, Right : Set) return Set renames Intersection; procedure Difference (Target : in out Set; Source : Set); -- Iterates over the Source (calling First and Next), calling Find to -- determine whether the element is in Target. If an equivalent element is -- found, it is deleted from Target. function Difference (Left, Right : Set) return Set; -- Iterates over the Left set, calling Find to determine whether the -- element is in the Right set. If an equivalent element is not found, the -- element is inserted into the result set. function "-" (Left, Right : Set) return Set renames Difference; procedure Symmetric_Difference (Target : in out Set; Source : Set); -- The operation first calls Reserve_Capacity if the current capacity is -- less than the sum of the lengths of Source and Target. It then iterates -- over the Source set, searching for the element in Target (calling Hash -- and Equivalent_Elements). If an equivalent element is found, it is -- removed from Target; otherwise it is inserted into Target. function Symmetric_Difference (Left, Right : Set) return Set; -- The operation first iterates over the Left set. It calls Find to -- determine whether the element is in the Right set. If no equivalent -- element is found, the element from Left is inserted into the result. The -- operation then iterates over the Right set, to determine whether the -- element is in the Left set. If no equivalent element is found, the Right -- element is inserted into the result. function "xor" (Left, Right : Set) return Set renames Symmetric_Difference; function Overlap (Left, Right : Set) return Boolean; -- Iterates over the Left set (calling First and Next), calling Find to -- determine whether the element is in the Right set. If an equivalent -- element is found, the operation immediately returns True. The operation -- returns False if the iteration over Left terminates without finding any -- equivalent element in Right. function Is_Subset (Subset : Set; Of_Set : Set) return Boolean; -- Iterates over Subset (calling First and Next), calling Find to determine -- whether the element is in Of_Set. If no equivalent element is found in -- Of_Set, the operation immediately returns False. The operation returns -- True if the iteration over Subset terminates without finding an element -- not in Of_Set (that is, every element in Subset is equivalent to an -- element in Of_Set). function First (Container : Set) return Cursor; -- Returns a cursor that designates the first non-empty bucket, by -- searching from the beginning of the buckets array. function Next (Position : Cursor) return Cursor; -- Returns a cursor that designates the node that follows the current one -- designated by Position. If Position designates the last node in its -- bucket, the operation calls Hash to compute the index of this bucket, -- and searches the buckets array for the first non-empty bucket, starting -- from that index; otherwise, it simply follows the link to the next node -- in the same bucket. procedure Next (Position : in out Cursor); -- Equivalent to Position := Next (Position) function Find (Container : Set; Item : Element_Type) return Cursor; -- Searches for Item in the set. Find calls Hash to determine the item's -- bucket; if the bucket is not empty, it calls Equivalent_Elements to -- compare Item to each element in the bucket. If the search succeeds, Find -- returns a cursor designating the node containing the equivalent element; -- otherwise, it returns No_Element. function Contains (Container : Set; Item : Element_Type) return Boolean; -- Equivalent to Find (Container, Item) /= No_Element function Equivalent_Elements (Left, Right : Cursor) return Boolean; -- Returns the result of calling Equivalent_Elements with the elements of -- the nodes designated by cursors Left and Right. function Equivalent_Elements (Left : Cursor; Right : Element_Type) return Boolean; -- Returns the result of calling Equivalent_Elements with element of the -- node designated by Left and element Right. function Equivalent_Elements (Left : Element_Type; Right : Cursor) return Boolean; -- Returns the result of calling Equivalent_Elements with element Left and -- the element of the node designated by Right. procedure Iterate (Container : Set; Process : not null access procedure (Position : Cursor)); -- Calls Process for each node in the set function Iterate (Container : Set) return Set_Iterator_Interfaces.Forward_Iterator'Class; generic type Key_Type (<>) is private; with function Key (Element : Element_Type) return Key_Type; with function Hash (Key : Key_Type) return Hash_Type; with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; package Generic_Keys is function Key (Position : Cursor) return Key_Type; -- Applies generic formal operation Key to the element of the node -- designated by Position. function Element (Container : Set; Key : Key_Type) return Element_Type; -- Searches (as per the key-based Find) for the node containing Key, and -- returns the associated element. procedure Replace (Container : in out Set; Key : Key_Type; New_Item : Element_Type); -- Searches (as per the key-based Find) for the node containing Key, and -- then replaces the element of that node (as per the element-based -- Replace_Element). procedure Exclude (Container : in out Set; Key : Key_Type); -- Searches for Key in the set, and if found, removes its node from the -- set and then deallocates it. The search works by first calling Hash -- (on Key) to determine the bucket; if the bucket is not empty, it -- calls Equivalent_Keys to compare parameter Key to the value of -- generic formal operation Key applied to element of each node in the -- bucket. procedure Delete (Container : in out Set; Key : Key_Type); -- Deletes the node containing Key as per Exclude, with the difference -- that Constraint_Error is raised if Key is not found. function Find (Container : Set; Key : Key_Type) return Cursor; -- Searches for the node containing Key, and returns a cursor -- designating the node. The search works by first calling Hash (on Key) -- to determine the bucket. If the bucket is not empty, the search -- compares Key to the element of each node in the bucket, and returns -- the matching node. The comparison itself works by applying the -- generic formal Key operation to the element of the node, and then -- calling generic formal operation Equivalent_Keys. function Contains (Container : Set; Key : Key_Type) return Boolean; -- Equivalent to Find (Container, Key) /= No_Element procedure Update_Element_Preserving_Key (Container : in out Set; Position : Cursor; Process : not null access procedure (Element : in out Element_Type)); -- Calls Process with the element of the node designated by Position, -- but with the restriction that the key-value of the element is not -- modified. The operation first makes a copy of the value returned by -- applying generic formal operation Key on the element of the node, and -- then calls Process with the element. The operation verifies that the -- key-part has not been modified by calling generic formal operation -- Equivalent_Keys to compare the saved key-value to the value returned -- by applying generic formal operation Key to the post-Process value of -- element. If the key values compare equal then the operation -- completes. Otherwise, the node is removed from the map and -- Program_Error is raised. type Reference_Type (Element : not null access Element_Type) is private with Implicit_Dereference => Element; function Reference_Preserving_Key (Container : aliased in out Set; Position : Cursor) return Reference_Type; function Constant_Reference (Container : aliased Set; Key : Key_Type) return Constant_Reference_Type; function Reference_Preserving_Key (Container : aliased in out Set; Key : Key_Type) return Reference_Type; private type Set_Access is access all Set; for Set_Access'Storage_Size use 0; package Impl is new Helpers.Generic_Implementation; type Reference_Control_Type is new Impl.Reference_Control_Type with record Container : Set_Access; Index : Hash_Type; Old_Pos : Cursor; Old_Hash : Hash_Type; end record; overriding procedure Finalize (Control : in out Reference_Control_Type); pragma Inline (Finalize); type Reference_Type (Element : not null access Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; use Ada.Streams; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Reference_Type); for Reference_Type'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Reference_Type); for Reference_Type'Write use Write; end Generic_Keys; private pragma Inline (Next); type Node_Type; type Node_Access is access Node_Type; type Element_Access is access all Element_Type; type Node_Type is limited record Element : Element_Access; Next : Node_Access; end record; package HT_Types is new Hash_Tables.Generic_Hash_Table_Types (Node_Type, Node_Access); type Set is new Ada.Finalization.Controlled with record HT : HT_Types.Hash_Table_Type; end record; overriding procedure Adjust (Container : in out Set); overriding procedure Finalize (Container : in out Set); use HT_Types, HT_Types.Implementation; use Ada.Finalization; use Ada.Streams; procedure Write (Stream : not null access Root_Stream_Type'Class; Container : Set); for Set'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Container : out Set); for Set'Read use Read; type Set_Access is access all Set; for Set_Access'Storage_Size use 0; type Cursor is record Container : Set_Access; Node : Node_Access; end record; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Cursor); for Cursor'Write use Write; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Cursor); for Cursor'Read use Read; subtype Reference_Control_Type is Implementation.Reference_Control_Type; -- It is necessary to rename this here, so that the compiler can find it type Constant_Reference_Type (Element : not null access constant Element_Type) is record Control : Reference_Control_Type := raise Program_Error with "uninitialized reference"; -- The RM says, "The default initialization of an object of -- type Constant_Reference_Type or Reference_Type propagates -- Program_Error." end record; procedure Read (Stream : not null access Root_Stream_Type'Class; Item : out Constant_Reference_Type); for Constant_Reference_Type'Read use Read; procedure Write (Stream : not null access Root_Stream_Type'Class; Item : Constant_Reference_Type); for Constant_Reference_Type'Write use Write; -- Three operations are used to optimize in the expansion of "for ... of" -- loops: the Next(Cursor) procedure in the visible part, and the following -- Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for -- details. function Pseudo_Reference (Container : aliased Set'Class) return Reference_Control_Type; pragma Inline (Pseudo_Reference); -- Creates an object of type Reference_Control_Type pointing to the -- container, and increments the Lock. Finalization of this object will -- decrement the Lock. function Get_Element_Access (Position : Cursor) return not null Element_Access; -- Returns a pointer to the element designated by Position. Empty_Set : constant Set := (Controlled with others => <>); No_Element : constant Cursor := (Container => null, Node => null); type Iterator is new Limited_Controlled and Set_Iterator_Interfaces.Forward_Iterator with record Container : Set_Access; end record with Disable_Controlled => not T_Check; overriding procedure Finalize (Object : in out Iterator); overriding function First (Object : Iterator) return Cursor; overriding function Next (Object : Iterator; Position : Cursor) return Cursor; end Ada.Containers.Indefinite_Hashed_Sets;
-- -- Copyright 2018 The wookey project team <wookey@ssi.gouv.fr> -- - Ryad Benadjila -- - Arnauld Michelizza -- - Mathieu Renard -- - Philippe Thierry -- - Philippe Trebuchet -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- with ewok.interrupts.handler; with ewok.tasks_shared; use ewok.tasks_shared; with ewok.devices_shared; use ewok.devices_shared; with m4.scb; with soc.nvic; package body ewok.interrupts with spark_mode => off is procedure init is begin m4.scb.SCB.SHCSR.USGFAULTENA := true; for i in interrupt_table'range loop interrupt_table(i) := (htype => DEFAULT_HANDLER, handler => NULL, task_id => ewok.tasks_shared.ID_UNUSED, device_id => ewok.devices_shared.ID_DEV_UNUSED); end loop; interrupt_table(soc.interrupts.INT_USAGEFAULT) := (htype => TASK_SWITCH_HANDLER, task_switch_handler => ewok.interrupts.handler.usagefault_handler'access, task_id => ewok.tasks_shared.ID_KERNEL, device_id => ewok.devices_shared.ID_DEV_UNUSED); interrupt_table(soc.interrupts.INT_HARDFAULT) := (htype => TASK_SWITCH_HANDLER, task_switch_handler => ewok.interrupts.handler.hardfault_handler'access, task_id => ewok.tasks_shared.ID_KERNEL, device_id => ewok.devices_shared.ID_DEV_UNUSED); interrupt_table(soc.interrupts.INT_SYSTICK) := (htype => TASK_SWITCH_HANDLER, task_switch_handler => ewok.interrupts.handler.systick_default_handler'access, task_id => ewok.tasks_shared.ID_KERNEL, device_id => ewok.devices_shared.ID_DEV_UNUSED); m4.scb.SCB.SHPR1.mem_fault.priority := 0; m4.scb.SCB.SHPR1.bus_fault.priority := 1; m4.scb.SCB.SHPR1.usage_fault.priority := 2; m4.scb.SCB.SHPR2.svc_call.priority := 3; m4.scb.SCB.SHPR3.pendsv.priority := 4; m4.scb.SCB.SHPR3.systick.priority := 5; for irq in soc.nvic.NVIC.IPR'range loop soc.nvic.NVIC.IPR(irq).priority := 7; end loop; end init; function is_interrupt_already_used (interrupt : soc.interrupts.t_interrupt) return boolean is begin return interrupt_table(interrupt).task_id /= ewok.tasks_shared.ID_UNUSED; end is_interrupt_already_used; procedure set_interrupt_handler (interrupt : in soc.interrupts.t_interrupt; handler : in t_interrupt_handler_access; task_id : in ewok.tasks_shared.t_task_id; device_id : in ewok.devices_shared.t_device_id; success : out boolean) is begin if handler = NULL then raise program_error; end if; interrupt_table(interrupt) := (DEFAULT_HANDLER, task_id, device_id, handler); success := true; end set_interrupt_handler; procedure reset_interrupt_handler (interrupt : in soc.interrupts.t_interrupt; task_id : in ewok.tasks_shared.t_task_id; device_id : in ewok.devices_shared.t_device_id) is begin if interrupt_table(interrupt).task_id /= task_id or interrupt_table(interrupt).device_id /= device_id then raise program_error; end if; interrupt_table(interrupt).handler := NULL; interrupt_table(interrupt).task_id := ID_UNUSED; interrupt_table(interrupt).device_id := ID_DEV_UNUSED; end reset_interrupt_handler; procedure set_task_switching_handler (interrupt : in soc.interrupts.t_interrupt; handler : in t_interrupt_task_switch_handler_access; task_id : in ewok.tasks_shared.t_task_id; device_id : in ewok.devices_shared.t_device_id; success : out boolean) is begin if handler = NULL then raise program_error; end if; interrupt_table(interrupt) := (TASK_SWITCH_HANDLER, task_id, device_id, handler); success := true; end set_task_switching_handler; function get_device_from_interrupt (interrupt : soc.interrupts.t_interrupt) return ewok.devices_shared.t_device_id is begin return interrupt_table(interrupt).device_id; end get_device_from_interrupt; end ewok.interrupts;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W I D _ W C H A R -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body System.Wid_WChar is -------------------------- -- Width_Wide_Character -- -------------------------- function Width_Wide_Character (Lo, Hi : Wide_Character) return Natural is W : Natural; P : Natural; begin W := 0; for C in Lo .. Hi loop P := Wide_Character'Pos (C); -- Here if we find a character in wide character range -- Width is max value (12) for Hex_hhhhhhhh if P > 16#FF# then return 12; -- If we are in character range then use length of character image else declare S : constant String := Character'Image (Character'Val (P)); begin W := Natural'Max (W, S'Length); end; end if; end loop; return W; end Width_Wide_Character; ------------------------------- -- Width_Wide_Wide_Character -- ------------------------------- function Width_Wide_Wide_Character (Lo, Hi : Wide_Wide_Character) return Natural is W : Natural; P : Natural; begin W := 0; for C in Lo .. Hi loop P := Wide_Wide_Character'Pos (C); -- Here if we find a character in wide wide character range. -- Width is max value (12) for Hex_hhhhhhhh if P > 16#FF# then W := 12; -- If we are in character range then use length of character image else declare S : constant String := Character'Image (Character'Val (P)); begin W := Natural'Max (W, S'Length); end; end if; end loop; return W; end Width_Wide_Wide_Character; end System.Wid_WChar;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . T E X T _ S T R E A M S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.File_IO; package body Ada.Wide_Text_IO.Text_Streams is ------------ -- Stream -- ------------ function Stream (File : File_Type) return Stream_Access is begin System.File_IO.Check_File_Open (FCB.AFCB_Ptr (File)); return Stream_Access (File); end Stream; end Ada.Wide_Text_IO.Text_Streams;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Mouse -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright 2018,2020 Thomas E. Dickey -- -- Copyright 1999-2009,2014 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: -- $Revision: 1.27 $ -- $Date: 2020/02/02 23:34:34 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Interfaces.C; use Interfaces.C; use Interfaces; package body Terminal_Interface.Curses.Mouse is function Has_Mouse return Boolean is function Mouse_Avail return C_Int; pragma Import (C, Mouse_Avail, "has_mouse"); begin if Has_Key (Key_Mouse) or else Mouse_Avail /= 0 then return True; else return False; end if; end Has_Mouse; function Get_Mouse return Mouse_Event is type Event_Access is access all Mouse_Event; function Getmouse (Ev : Event_Access) return C_Int; pragma Import (C, Getmouse, "getmouse"); Event : aliased Mouse_Event; begin if Getmouse (Event'Access) = Curses_Err then raise Curses_Exception; end if; return Event; end Get_Mouse; procedure Register_Reportable_Event (Button : Mouse_Button; State : Button_State; Mask : in out Event_Mask) is Button_Nr : constant Natural := Mouse_Button'Pos (Button); State_Nr : constant Natural := Button_State'Pos (State); begin if Button in Modifier_Keys and then State /= Pressed then raise Curses_Exception; else if Button in Real_Buttons then Mask := Mask or ((2 ** (6 * Button_Nr)) ** State_Nr); else Mask := Mask or (BUTTON_CTRL ** (Button_Nr - 4)); end if; end if; end Register_Reportable_Event; procedure Register_Reportable_Events (Button : Mouse_Button; State : Button_States; Mask : in out Event_Mask) is begin for S in Button_States'Range loop if State (S) then Register_Reportable_Event (Button, S, Mask); end if; end loop; end Register_Reportable_Events; function Start_Mouse (Mask : Event_Mask := All_Events) return Event_Mask is function MMask (M : Event_Mask; O : access Event_Mask) return Event_Mask; pragma Import (C, MMask, "mousemask"); R : Event_Mask; Old : aliased Event_Mask; begin R := MMask (Mask, Old'Access); if R = No_Events then Beep; end if; return Old; end Start_Mouse; procedure End_Mouse (Mask : Event_Mask := No_Events) is begin if Mask /= No_Events then Beep; end if; end End_Mouse; procedure Dispatch_Event (Mask : Event_Mask; Button : out Mouse_Button; State : out Button_State); procedure Dispatch_Event (Mask : Event_Mask; Button : out Mouse_Button; State : out Button_State) is L : Event_Mask; begin Button := Alt; -- preset to non real button; if (Mask and BUTTON1_EVENTS) /= 0 then Button := Left; elsif (Mask and BUTTON2_EVENTS) /= 0 then Button := Middle; elsif (Mask and BUTTON3_EVENTS) /= 0 then Button := Right; elsif (Mask and BUTTON4_EVENTS) /= 0 then Button := Button4; end if; if Button in Real_Buttons then L := 2 ** (6 * Mouse_Button'Pos (Button)); for I in Button_State'Range loop if (Mask and L) /= 0 then State := I; exit; end if; L := 2 * L; end loop; else State := Pressed; if (Mask and BUTTON_CTRL) /= 0 then Button := Control; elsif (Mask and BUTTON_SHIFT) /= 0 then Button := Shift; elsif (Mask and BUTTON_ALT) /= 0 then Button := Alt; end if; end if; end Dispatch_Event; procedure Get_Event (Event : Mouse_Event; Y : out Line_Position; X : out Column_Position; Button : out Mouse_Button; State : out Button_State) is Mask : constant Event_Mask := Event.Bstate; begin X := Column_Position (Event.X); Y := Line_Position (Event.Y); Dispatch_Event (Mask, Button, State); end Get_Event; procedure Unget_Mouse (Event : Mouse_Event) is function Ungetmouse (Ev : Mouse_Event) return C_Int; pragma Import (C, Ungetmouse, "ungetmouse"); begin if Ungetmouse (Event) = Curses_Err then raise Curses_Exception; end if; end Unget_Mouse; function Enclosed_In_Window (Win : Window := Standard_Window; Event : Mouse_Event) return Boolean is function Wenclose (Win : Window; Y : C_Int; X : C_Int) return Curses_Bool; pragma Import (C, Wenclose, "wenclose"); begin if Wenclose (Win, C_Int (Event.Y), C_Int (Event.X)) = Curses_Bool_False then return False; else return True; end if; end Enclosed_In_Window; function Mouse_Interval (Msec : Natural := 200) return Natural is function Mouseinterval (Msec : C_Int) return C_Int; pragma Import (C, Mouseinterval, "mouseinterval"); begin return Natural (Mouseinterval (C_Int (Msec))); end Mouse_Interval; end Terminal_Interface.Curses.Mouse;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ -- This package provides the SAX_Attributes type provides XML attributes. ------------------------------------------------------------------------------ pragma Ada_2012; private with Ada.Finalization; with League.Strings; private with Matreshka.Atomics.Counters; private with Matreshka.Internals.Strings; package XML.SAX.Attributes is pragma Preelaborate; type SAX_Attributes is tagged private with Iterator_Element => League.Strings.Universal_String, Constant_Indexing => Value; pragma Preelaborable_Initialization (SAX_Attributes); Empty_SAX_Attributes : constant SAX_Attributes; function Length (Self : SAX_Attributes'Class) return Natural; -- Returns the number of attributes in the list. procedure Clear (Self : in out SAX_Attributes'Class); -- Removes all attributes from the set. function Index (Self : SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String) return Natural; -- Looks up the index of an attribute by the qualified name. Returns the -- index of the attribute of zero if it wasn't found. function Index (Self : SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return Natural; -- Looks up the index of an attribute by a namespace name. Namespace_URI -- specifies the namespace URI, or an empty string if the name has no -- namespace URI. Local_Name specifies the attribute's local name. -- Returns the index of the attribute, or zero if it wasn't found. function Is_Declared (Self : SAX_Attributes'Class; Index : Positive) return Boolean; -- Returns True if the attribute at the specified position was declared in -- the DTD, False otherwise. The index must be valid position, otherwise -- Constraint_Error is raised. function Is_Declared (Self : SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String) return Boolean; -- Looks up whether an attribute was declared in the DTD for the qualified -- name and returns True. function Is_Declared (Self : SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return Boolean; -- Looks up whether an attribute was declared in the DTD by namespace name. -- Namespace_URI specifies the namespace URI, or an empty string if the -- name has no namespace URI, Local_Name specifies the attribute's local -- name. function Is_Empty (Self : SAX_Attributes'Class) return Boolean; -- Returns True when there are no attributes available. function Is_Specified (Self : SAX_Attributes'Class; Index : Positive) return Boolean; -- Returns True if the attribute's value at the specified position was -- found in the XML text, False if the value was provided by the DTD -- defaulting. The index must be valid position, otherwise Constraint_Error -- is raised. function Is_Specified (Self : SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String) return Boolean; -- Looks up whether an attribute's value was found in the XML text for the -- qualified name, False if the value was provided by the DTD defaulting. function Is_Specified (Self : SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return Boolean; -- Looks up whether an attribute's value was found in the XML text for the -- namespace name, False if the value was provided by the DTD defaulting. -- Namespace_URI specifies the namespace URI, or an empty string if the -- name has no namespace URI, Local_Name specifies the attribute's local -- name. function Local_Name (Self : SAX_Attributes'Class; Index : Positive) return League.Strings.Universal_String; -- Returns an attribute's local name for the attribute at the specified -- position. If no namespace processing is done, the local name is an empty -- string. The index must be valid position, otherwise Constraint_Error is -- raised. function Namespace_URI (Self : SAX_Attributes'Class; Index : Positive) return League.Strings.Universal_String; -- Returns an attribute's namespace URI for the attribute at the specified -- position. If no namespace processing is done or if the attribute has no -- namespace, the namespace URI is an empty string. The index must be valid -- position, otherwise Constraint_Error is raised. function Qualified_Name (Self : SAX_Attributes'Class; Index : Positive) return League.Strings.Universal_String; -- Returns an attribute's qualified name for the attribute at the specified -- position. The index must be valid position, otherwise Constraint_Error -- is raised. function Value (Self : SAX_Attributes'Class; Index : Positive) return League.Strings.Universal_String; -- Returns an attribute's value for the attribute at the specified -- position. The index must be valid position, otherwise Constraint_Error -- is raised. -- -- If the attribute value is a list of tokens (IDREFS, ENTITIES, or -- NMTOKENS), the tokens will be concatenated into a single string with -- each token separated by a single space. function Value (Self : SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String) return League.Strings.Universal_String; -- Looks up an attribute's value for the qualified name, or an empty -- string if no attribute exists for the name given. -- -- If the attribute value is a list of tokens (IDREFS, ENTITIES, or -- NMTOKENS), the tokens will be concatenated into a single string with -- each token separated by a single space. function Value (Self : SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return League.Strings.Universal_String; -- Looks up an attribute's value by namespace name. Namespace_URI specifies -- the namespace URI, or an empty string if the name has no namespace URI, -- Local_Name specifies the attribute's local name. -- -- If the attribute value is a list of tokens (IDREFS, ENTITIES, or -- NMTOKENS), the tokens will be concatenated into a single string with -- each token separated by a single space. function Value_Type (Self : SAX_Attributes'Class; Index : Positive) return League.Strings.Universal_String; -- Looks up an attribute's type for the attribute at position Index. -- -- The attribute type is one of the strings "CDATA", "ID", "IDREF", -- "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" -- (always in upper case). -- -- If the parser has not read a declaration for the attribute, or if the -- parser does not report attribute types, then it must return the value -- "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, -- "Attribute-Value Normalization"). -- -- For an enumerated attribute that is not a notation, the parser will -- report the type as "NMTOKEN". function Value_Type (Self : SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String) return League.Strings.Universal_String; -- Looks up an attribute's type for the qualified name Qualified_Name. -- -- The attribute type is one of the strings "CDATA", "ID", "IDREF", -- "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" -- (always in upper case). -- -- If the parser has not read a declaration for the attribute, or if the -- parser does not report attribute types, then it must return the value -- "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, -- "Attribute-Value Normalization"). -- -- For an enumerated attribute that is not a notation, the parser will -- report the type as "NMTOKEN". function Value_Type (Self : SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String) return League.Strings.Universal_String; -- Looks up an attribute's type by namespace name. -- -- Namespace_URI specifies the namespace URI and Local_Name specifies the -- local name. If the name has no namespace URI, use an empty string for -- Namespace_URI. -- -- The attribute type is one of the strings "CDATA", "ID", "IDREF", -- "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" -- (always in upper case). -- -- If the parser has not read a declaration for the attribute, or if the -- parser does not report attribute types, then it must return the value -- "CDATA" as stated in the XML 1.0 Recommendation (clause 3.3.3, -- "Attribute-Value Normalization"). -- -- For an enumerated attribute that is not a notation, the parser will -- report the type as "NMTOKEN". procedure Set_Value (Self : in out SAX_Attributes'Class; Qualified_Name : League.Strings.Universal_String; Value : League.Strings.Universal_String); -- Sets value of attribute specified by its qualified name Qualified_Name. -- -- If attribute is present in the set its value is changed, otherwise -- new attribute is added to the set. procedure Set_Value (Self : in out SAX_Attributes'Class; Namespace_URI : League.Strings.Universal_String; Local_Name : League.Strings.Universal_String; Value : League.Strings.Universal_String); -- Sets value of attribute specified by the namespace name. -- -- Namespace_URI specifies the namespace URI and Local_Name specifies the -- local name. If the name has no namespace URI, use an empty string for -- Namespace_URI. -- -- If attribute is present in the set its value is changed, otherwise -- new attribute is added to the set. private -- Representation of one attribute and its value. type Attribute is record Namespace_URI : Matreshka.Internals.Strings.Shared_String_Access := Matreshka.Internals.Strings.Shared_Empty'Access; Local_Name : Matreshka.Internals.Strings.Shared_String_Access := Matreshka.Internals.Strings.Shared_Empty'Access; Qualified_Name : Matreshka.Internals.Strings.Shared_String_Access := Matreshka.Internals.Strings.Shared_Empty'Access; Value : Matreshka.Internals.Strings.Shared_String_Access := Matreshka.Internals.Strings.Shared_Empty'Access; Value_Type : Matreshka.Internals.Strings.Shared_String_Access := Matreshka.Internals.Strings.Shared_Empty'Access; Is_Declared : Boolean; Is_Specified : Boolean; end record; -- Set attributes and its values shared between SAX_Attributes instances. type Attribute_Array is array (Positive range <>) of Attribute; type Shared_Attributes (Last : Natural) is record Counter : Matreshka.Atomics.Counters.Counter; Values : Attribute_Array (1 .. Last); Length : Natural := 0; end record; type Shared_Attributes_Access is access all Shared_Attributes; procedure Reference (Self : Shared_Attributes_Access); pragma Inline (Reference); -- Increments reference counter. procedure Dereference (Self : in out Shared_Attributes_Access); -- Decrements reference counter and release resources when it reach zero. function Can_Be_Reused (Self : Shared_Attributes_Access) return Boolean; -- Returns True when the counter is equal to one, thus there are no other -- reference to this shared object and it can be mutated instead of -- allocation of new shared object. procedure Detach (Self : in out Shared_Attributes_Access; Size : Natural); -- Checks whether specified set of attributes can be reused to store data -- of the specified size and prepare it to be changed; otherwise allocates -- new set of attributes and copy data. Shared_Empty : aliased Shared_Attributes (0); -- Globals shared object. It is used to represent empty set of attributes -- to avoid unnecessary memory allocation/deallocation and number of -- atomic increment/decrement operations. -------------------- -- SAX_Attributes -- -------------------- type SAX_Attributes is new Ada.Finalization.Controlled with record Data : Shared_Attributes_Access := Shared_Empty'Access; end record; overriding procedure Adjust (Self : in out SAX_Attributes); overriding procedure Finalize (Self : in out SAX_Attributes); Empty_SAX_Attributes : constant SAX_Attributes := (Ada.Finalization.Controlled with Data => Shared_Empty'Access); pragma Inline (Is_Empty); pragma Inline (Length); end XML.SAX.Attributes;
-------------------------------------------------------------------------------- -- Copyright (C) 2020 by Heisenbug Ltd. (gh+owm@heisenbug.eu) -- -- This work is free. You can redistribute it and/or modify it under the -- terms of the Do What The Fuck You Want To Public License, Version 2, -- as published by Sam Hocevar. See the LICENSE file for more details. -------------------------------------------------------------------------------- pragma License (Unrestricted); limited with Ada.Interrupts.Names; limited with System; package Signal_Handlers is pragma Unreserve_All_Interrupts; protected Sigint with Interrupt_Priority => System.Interrupt_Priority'First is -------------------------------------------------------------------------- -- Wait -------------------------------------------------------------------------- entry Wait; -------------------------------------------------------------------------- -- Handle -------------------------------------------------------------------------- procedure Handle with Interrupt_Handler => True, Attach_Handler => Ada.Interrupts.Names.SIGINT; private Call_Count : Natural := 0; end Sigint; end Signal_Handlers;
with float_Math.Algebra.linear.d3; package Impact -- -- Provides 2/3d physics simulations. -- is pragma Pure; package Math renames float_Math; package linear_Algebra_3d renames float_Math.Algebra.linear.d3; BT_LARGE_FLOAT : constant math.Real := 1.0e18; type Any is abstract tagged null record; -- Equivalent of 'void' in C. end Impact;
with Ada.Text_IO; use Ada.Text_IO; with Registre; procedure Test_Registre is package Registre_Test is new Registre (100, Integer); use Registre_Test; procedure Test_Initialiser is Registre : T_Registre; begin Initialiser (Registre); pragma Assert (Est_Vide (Registre)); Detruire (Registre); end Test_Initialiser; procedure Test_Attribuer is Registre : T_Registre; begin Initialiser (Registre); Attribuer (Registre, 1, 1); pragma Assert (Existe (Registre, 1)); Detruire (Registre); end Test_Attribuer; procedure Test_Acceder is Registre : T_Registre; begin Initialiser (Registre); Attribuer (Registre, 1, 1); pragma Assert (Acceder (Registre, 1) = 1); Detruire (Registre); end Test_Acceder; procedure Test_Supprimer is Registre : T_Registre; begin Initialiser (Registre); Attribuer (Registre, 1, 2); Supprimer (Registre, 1); pragma Assert (not Existe (Registre, 1)); Detruire (Registre); end Test_Supprimer; procedure Test_Detruire is Registre : T_Registre; begin Initialiser (Registre); Attribuer (Registre, 1, 2); Attribuer (Registre, 3, 4); Attribuer (Registre, 2, 5); Detruire (Registre); pragma Assert (Est_Vide (Registre)); end Test_Detruire; begin Test_Initialiser; Test_Acceder; Test_Attribuer; Test_Supprimer; Test_Detruire; Put_Line ("Le module est fonctionnel"); end Test_Registre;
with Interfaces; with kv.avm.Actor_References; with kv.avm.Tuples; with kv.avm.Registers; with kv.avm.Messages; package kv.avm.Control is NO_FUTURE : constant Interfaces.Unsigned_32 := 0; type Status_Type is (Active, Blocked, Deferred, Idle, Error); subtype Running_Status_Type is Status_Type range Active .. Deferred; type Control_Interface is interface; type Control_Access is access all Control_Interface'CLASS; procedure New_Actor (Self : in out Control_Interface; Name : in String; Instance : out kv.avm.Actor_References.Actor_Reference_Type) is abstract; procedure Post_Message (Self : in out Control_Interface; Message : in kv.avm.Messages.Message_Type; Status : out Status_Type) is abstract; procedure Post_Response (Self : in out Control_Interface; Reply_To : in kv.avm.Actor_References.Actor_Reference_Type; Answer : in kv.avm.Tuples.Tuple_Type; Future : in Interfaces.Unsigned_32) is abstract; procedure Generate_Next_Future (Self : in out Control_Interface; Future : out Interfaces.Unsigned_32) is abstract; procedure Trap_To_The_Machine (Self : in out Control_Interface; Trap : in String; Data : in kv.avm.Registers.Register_Type; Answer : out kv.avm.Registers.Register_Type; Status : out Status_Type) is abstract; procedure Activate_Instance (Self : in out Control_Interface; Instance : in kv.avm.Actor_References.Actor_Reference_Type) is abstract; end kv.avm.Control;
procedure Puzzle_20 is begin null; end Puzzle_20;
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Lexical_Elements; package Program.Elements.Type_Conversions is pragma Pure (Program.Elements.Type_Conversions); type Type_Conversion is limited interface and Program.Elements.Expressions.Expression; type Type_Conversion_Access is access all Type_Conversion'Class with Storage_Size => 0; not overriding function Subtype_Mark (Self : Type_Conversion) return not null Program.Elements.Expressions.Expression_Access is abstract; not overriding function Operand (Self : Type_Conversion) return not null Program.Elements.Expressions.Expression_Access is abstract; type Type_Conversion_Text is limited interface; type Type_Conversion_Text_Access is access all Type_Conversion_Text'Class with Storage_Size => 0; not overriding function To_Type_Conversion_Text (Self : aliased in out Type_Conversion) return Type_Conversion_Text_Access is abstract; not overriding function Left_Bracket_Token (Self : Type_Conversion_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Type_Conversion_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Type_Conversions;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- G N A T L I N K -- -- -- -- S p e c -- -- -- -- Copyright (C) 1996-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING3. If not, go to -- -- http://www.gnu.org/licenses for a complete copy of the license. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ procedure Gnatlink; -- The driver for the gnatlink tool. This utility produces an -- executable program from a set compiled object files and -- libraries. For more information on gnatlink (its precise usage, -- flags and algorithm) please refer to the body of gnatlink.
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT -- License-Filename: LICENSE ------------------------------------------------------------- with Program.Elements.Expressions; with Program.Lexical_Elements; with Program.Elements.Simple_Expression_Ranges; with Program.Element_Visitors; package Program.Nodes.Simple_Expression_Ranges is pragma Preelaborate; type Simple_Expression_Range is new Program.Nodes.Node and Program.Elements.Simple_Expression_Ranges.Simple_Expression_Range and Program.Elements.Simple_Expression_Ranges .Simple_Expression_Range_Text with private; function Create (Lower_Bound : not null Program.Elements.Expressions .Expression_Access; Double_Dot_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Upper_Bound : not null Program.Elements.Expressions .Expression_Access) return Simple_Expression_Range; type Implicit_Simple_Expression_Range is new Program.Nodes.Node and Program.Elements.Simple_Expression_Ranges.Simple_Expression_Range with private; function Create (Lower_Bound : not null Program.Elements.Expressions .Expression_Access; Upper_Bound : not null Program.Elements.Expressions .Expression_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False) return Implicit_Simple_Expression_Range with Pre => Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance; private type Base_Simple_Expression_Range is abstract new Program.Nodes.Node and Program.Elements.Simple_Expression_Ranges.Simple_Expression_Range with record Lower_Bound : not null Program.Elements.Expressions.Expression_Access; Upper_Bound : not null Program.Elements.Expressions.Expression_Access; end record; procedure Initialize (Self : aliased in out Base_Simple_Expression_Range'Class); overriding procedure Visit (Self : not null access Base_Simple_Expression_Range; Visitor : in out Program.Element_Visitors.Element_Visitor'Class); overriding function Lower_Bound (Self : Base_Simple_Expression_Range) return not null Program.Elements.Expressions.Expression_Access; overriding function Upper_Bound (Self : Base_Simple_Expression_Range) return not null Program.Elements.Expressions.Expression_Access; overriding function Is_Simple_Expression_Range_Element (Self : Base_Simple_Expression_Range) return Boolean; overriding function Is_Constraint_Element (Self : Base_Simple_Expression_Range) return Boolean; overriding function Is_Definition_Element (Self : Base_Simple_Expression_Range) return Boolean; type Simple_Expression_Range is new Base_Simple_Expression_Range and Program.Elements.Simple_Expression_Ranges .Simple_Expression_Range_Text with record Double_Dot_Token : not null Program.Lexical_Elements .Lexical_Element_Access; end record; overriding function To_Simple_Expression_Range_Text (Self : aliased in out Simple_Expression_Range) return Program.Elements.Simple_Expression_Ranges .Simple_Expression_Range_Text_Access; overriding function Double_Dot_Token (Self : Simple_Expression_Range) return not null Program.Lexical_Elements.Lexical_Element_Access; type Implicit_Simple_Expression_Range is new Base_Simple_Expression_Range with record Is_Part_Of_Implicit : Boolean; Is_Part_Of_Inherited : Boolean; Is_Part_Of_Instance : Boolean; end record; overriding function To_Simple_Expression_Range_Text (Self : aliased in out Implicit_Simple_Expression_Range) return Program.Elements.Simple_Expression_Ranges .Simple_Expression_Range_Text_Access; overriding function Is_Part_Of_Implicit (Self : Implicit_Simple_Expression_Range) return Boolean; overriding function Is_Part_Of_Inherited (Self : Implicit_Simple_Expression_Range) return Boolean; overriding function Is_Part_Of_Instance (Self : Implicit_Simple_Expression_Range) return Boolean; end Program.Nodes.Simple_Expression_Ranges;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ M A P S -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; package body Ada.Strings.Wide_Maps is --------- -- "-" -- --------- function "-" (Left, Right : Wide_Character_Set) return Wide_Character_Set is LS : constant Wide_Character_Ranges_Access := Left.Set; RS : constant Wide_Character_Ranges_Access := Right.Set; Result : Wide_Character_Ranges (1 .. LS'Last + RS'Last); -- Each range on the right can generate at least one more range in -- the result, by splitting one of the left operand ranges. N : Natural := 0; R : Natural := 1; L : Natural := 1; Left_Low : Wide_Character; -- Left_Low is lowest character of the L'th range not yet dealt with begin if LS'Last = 0 or else RS'Last = 0 then return Left; end if; Left_Low := LS (L).Low; while R <= RS'Last loop -- If next right range is below current left range, skip it if RS (R).High < Left_Low then R := R + 1; -- If next right range above current left range, copy remainder -- of the left range to the result elsif RS (R).Low > LS (L).High then N := N + 1; Result (N).Low := Left_Low; Result (N).High := LS (L).High; L := L + 1; exit when L > LS'Last; Left_Low := LS (L).Low; else -- Next right range overlaps bottom of left range if RS (R).Low <= Left_Low then -- Case of right range complete overlaps left range if RS (R).High >= LS (L).High then L := L + 1; exit when L > LS'Last; Left_Low := LS (L).Low; -- Case of right range eats lower part of left range else Left_Low := Wide_Character'Succ (RS (R).High); R := R + 1; end if; -- Next right range overlaps some of left range, but not bottom else N := N + 1; Result (N).Low := Left_Low; Result (N).High := Wide_Character'Pred (RS (R).Low); -- Case of right range splits left range if RS (R).High < LS (L).High then Left_Low := Wide_Character'Succ (RS (R).High); R := R + 1; -- Case of right range overlaps top of left range else L := L + 1; exit when L > LS'Last; Left_Low := LS (L).Low; end if; end if; end if; end loop; -- Copy remainder of left ranges to result if L <= LS'Last then N := N + 1; Result (N).Low := Left_Low; Result (N).High := LS (L).High; loop L := L + 1; exit when L > LS'Last; N := N + 1; Result (N) := LS (L); end loop; end if; return (AF.Controlled with Set => new Wide_Character_Ranges'(Result (1 .. N))); end "-"; --------- -- "=" -- --------- -- The sorted, discontiguous form is canonical, so equality can be used function "=" (Left, Right : Wide_Character_Set) return Boolean is begin return Left.Set.all = Right.Set.all; end "="; ----------- -- "and" -- ----------- function "and" (Left, Right : Wide_Character_Set) return Wide_Character_Set is LS : constant Wide_Character_Ranges_Access := Left.Set; RS : constant Wide_Character_Ranges_Access := Right.Set; Result : Wide_Character_Ranges (1 .. LS'Last + RS'Last); N : Natural := 0; L, R : Natural := 1; begin -- Loop to search for overlapping character ranges while L <= LS'Last and then R <= RS'Last loop if LS (L).High < RS (R).Low then L := L + 1; elsif RS (R).High < LS (L).Low then R := R + 1; -- Here we have LS (L).High >= RS (R).Low -- and RS (R).High >= LS (L).Low -- so we have an overlapping range else N := N + 1; Result (N).Low := Wide_Character'Max (LS (L).Low, RS (R).Low); Result (N).High := Wide_Character'Min (LS (L).High, RS (R).High); if RS (R).High = LS (L).High then L := L + 1; R := R + 1; elsif RS (R).High < LS (L).High then R := R + 1; else L := L + 1; end if; end if; end loop; return (AF.Controlled with Set => new Wide_Character_Ranges'(Result (1 .. N))); end "and"; ----------- -- "not" -- ----------- function "not" (Right : Wide_Character_Set) return Wide_Character_Set is RS : constant Wide_Character_Ranges_Access := Right.Set; Result : Wide_Character_Ranges (1 .. RS'Last + 1); N : Natural := 0; begin if RS'Last = 0 then N := 1; Result (1) := (Low => Wide_Character'First, High => Wide_Character'Last); else if RS (1).Low /= Wide_Character'First then N := N + 1; Result (N).Low := Wide_Character'First; Result (N).High := Wide_Character'Pred (RS (1).Low); end if; for K in 1 .. RS'Last - 1 loop N := N + 1; Result (N).Low := Wide_Character'Succ (RS (K).High); Result (N).High := Wide_Character'Pred (RS (K + 1).Low); end loop; if RS (RS'Last).High /= Wide_Character'Last then N := N + 1; Result (N).Low := Wide_Character'Succ (RS (RS'Last).High); Result (N).High := Wide_Character'Last; end if; end if; return (AF.Controlled with Set => new Wide_Character_Ranges'(Result (1 .. N))); end "not"; ---------- -- "or" -- ---------- function "or" (Left, Right : Wide_Character_Set) return Wide_Character_Set is LS : constant Wide_Character_Ranges_Access := Left.Set; RS : constant Wide_Character_Ranges_Access := Right.Set; Result : Wide_Character_Ranges (1 .. LS'Last + RS'Last); N : Natural; L, R : Natural; begin N := 0; L := 1; R := 1; -- Loop through ranges in output file loop -- If no left ranges left, copy next right range if L > LS'Last then exit when R > RS'Last; N := N + 1; Result (N) := RS (R); R := R + 1; -- If no right ranges left, copy next left range elsif R > RS'Last then N := N + 1; Result (N) := LS (L); L := L + 1; else -- We have two ranges, choose lower one N := N + 1; if LS (L).Low <= RS (R).Low then Result (N) := LS (L); L := L + 1; else Result (N) := RS (R); R := R + 1; end if; -- Loop to collapse ranges into last range loop -- Collapse next length range into current result range -- if possible. if L <= LS'Last and then LS (L).Low <= Wide_Character'Succ (Result (N).High) then Result (N).High := Wide_Character'Max (Result (N).High, LS (L).High); L := L + 1; -- Collapse next right range into current result range -- if possible elsif R <= RS'Last and then RS (R).Low <= Wide_Character'Succ (Result (N).High) then Result (N).High := Wide_Character'Max (Result (N).High, RS (R).High); R := R + 1; -- If neither range collapses, then done with this range else exit; end if; end loop; end if; end loop; return (AF.Controlled with Set => new Wide_Character_Ranges'(Result (1 .. N))); end "or"; ----------- -- "xor" -- ----------- function "xor" (Left, Right : Wide_Character_Set) return Wide_Character_Set is begin return (Left or Right) - (Left and Right); end "xor"; ------------ -- Adjust -- ------------ procedure Adjust (Object : in out Wide_Character_Mapping) is begin Object.Map := new Wide_Character_Mapping_Values'(Object.Map.all); end Adjust; procedure Adjust (Object : in out Wide_Character_Set) is begin Object.Set := new Wide_Character_Ranges'(Object.Set.all); end Adjust; -------------- -- Finalize -- -------------- procedure Finalize (Object : in out Wide_Character_Mapping) is procedure Free is new Ada.Unchecked_Deallocation (Wide_Character_Mapping_Values, Wide_Character_Mapping_Values_Access); begin if Object.Map /= Null_Map'Unrestricted_Access then Free (Object.Map); end if; end Finalize; procedure Finalize (Object : in out Wide_Character_Set) is procedure Free is new Ada.Unchecked_Deallocation (Wide_Character_Ranges, Wide_Character_Ranges_Access); begin if Object.Set /= Null_Range'Unrestricted_Access then Free (Object.Set); end if; end Finalize; ---------------- -- Initialize -- ---------------- procedure Initialize (Object : in out Wide_Character_Mapping) is begin Object := Identity; end Initialize; procedure Initialize (Object : in out Wide_Character_Set) is begin Object := Null_Set; end Initialize; ----------- -- Is_In -- ----------- function Is_In (Element : Wide_Character; Set : Wide_Character_Set) return Boolean is L, R, M : Natural; SS : constant Wide_Character_Ranges_Access := Set.Set; begin L := 1; R := SS'Last; -- Binary search loop. The invariant is that if Element is in any of -- of the constituent ranges it is in one between Set (L) and Set (R). loop if L > R then return False; else M := (L + R) / 2; if Element > SS (M).High then L := M + 1; elsif Element < SS (M).Low then R := M - 1; else return True; end if; end if; end loop; end Is_In; --------------- -- Is_Subset -- --------------- function Is_Subset (Elements : Wide_Character_Set; Set : Wide_Character_Set) return Boolean is ES : constant Wide_Character_Ranges_Access := Elements.Set; SS : constant Wide_Character_Ranges_Access := Set.Set; S : Positive := 1; E : Positive := 1; begin loop -- If no more element ranges, done, and result is true if E > ES'Last then return True; -- If more element ranges, but no more set ranges, result is false elsif S > SS'Last then return False; -- Remove irrelevant set range elsif SS (S).High < ES (E).Low then S := S + 1; -- Get rid of element range that is properly covered by set elsif SS (S).Low <= ES (E).Low and then ES (E).High <= SS (S).High then E := E + 1; -- Otherwise we have a non-covered element range, result is false else return False; end if; end loop; end Is_Subset; --------------- -- To_Domain -- --------------- function To_Domain (Map : Wide_Character_Mapping) return Wide_Character_Sequence is begin return Map.Map.Domain; end To_Domain; ---------------- -- To_Mapping -- ---------------- function To_Mapping (From, To : Wide_Character_Sequence) return Wide_Character_Mapping is Domain : Wide_Character_Sequence (1 .. From'Length); Rangev : Wide_Character_Sequence (1 .. To'Length); N : Natural := 0; begin if From'Length /= To'Length then raise Translation_Error; else pragma Warnings (Off); -- apparent uninit use of Domain for J in From'Range loop for M in 1 .. N loop if From (J) = Domain (M) then raise Translation_Error; elsif From (J) < Domain (M) then Domain (M + 1 .. N + 1) := Domain (M .. N); Rangev (M + 1 .. N + 1) := Rangev (M .. N); Domain (M) := From (J); Rangev (M) := To (J); goto Continue; end if; end loop; Domain (N + 1) := From (J); Rangev (N + 1) := To (J); <<Continue>> N := N + 1; end loop; pragma Warnings (On); return (AF.Controlled with Map => new Wide_Character_Mapping_Values'( Length => N, Domain => Domain (1 .. N), Rangev => Rangev (1 .. N))); end if; end To_Mapping; -------------- -- To_Range -- -------------- function To_Range (Map : Wide_Character_Mapping) return Wide_Character_Sequence is begin return Map.Map.Rangev; end To_Range; --------------- -- To_Ranges -- --------------- function To_Ranges (Set : Wide_Character_Set) return Wide_Character_Ranges is begin return Set.Set.all; end To_Ranges; ----------------- -- To_Sequence -- ----------------- function To_Sequence (Set : Wide_Character_Set) return Wide_Character_Sequence is SS : constant Wide_Character_Ranges_Access := Set.Set; N : Natural := 0; Count : Natural := 0; begin for J in SS'Range loop Count := Count + (Wide_Character'Pos (SS (J).High) - Wide_Character'Pos (SS (J).Low) + 1); end loop; return Result : Wide_String (1 .. Count) do for J in SS'Range loop for K in SS (J).Low .. SS (J).High loop N := N + 1; Result (N) := K; end loop; end loop; end return; end To_Sequence; ------------ -- To_Set -- ------------ -- Case of multiple range input function To_Set (Ranges : Wide_Character_Ranges) return Wide_Character_Set is Result : Wide_Character_Ranges (Ranges'Range); N : Natural := 0; J : Natural; begin -- The output of To_Set is required to be sorted by increasing Low -- values, and discontiguous, so first we sort them as we enter them, -- using a simple insertion sort. pragma Warnings (Off); -- Kill bogus warning on Result being uninitialized for J in Ranges'Range loop for K in 1 .. N loop if Ranges (J).Low < Result (K).Low then Result (K + 1 .. N + 1) := Result (K .. N); Result (K) := Ranges (J); goto Continue; end if; end loop; Result (N + 1) := Ranges (J); <<Continue>> N := N + 1; end loop; pragma Warnings (On); -- Now collapse any contiguous or overlapping ranges J := 1; while J < N loop if Result (J).High < Result (J).Low then N := N - 1; Result (J .. N) := Result (J + 1 .. N + 1); elsif Wide_Character'Succ (Result (J).High) >= Result (J + 1).Low then Result (J).High := Wide_Character'Max (Result (J).High, Result (J + 1).High); N := N - 1; Result (J + 1 .. N) := Result (J + 2 .. N + 1); else J := J + 1; end if; end loop; if N > 0 and then Result (N).High < Result (N).Low then N := N - 1; end if; return (AF.Controlled with Set => new Wide_Character_Ranges'(Result (1 .. N))); end To_Set; -- Case of single range input function To_Set (Span : Wide_Character_Range) return Wide_Character_Set is begin if Span.Low > Span.High then return Null_Set; -- This is safe, because there is no procedure with parameter -- Wide_Character_Set of mode "out" or "in out". else return (AF.Controlled with Set => new Wide_Character_Ranges'(1 => Span)); end if; end To_Set; -- Case of wide string input function To_Set (Sequence : Wide_Character_Sequence) return Wide_Character_Set is R : Wide_Character_Ranges (1 .. Sequence'Length); begin for J in R'Range loop R (J) := (Sequence (J), Sequence (J)); end loop; return To_Set (R); end To_Set; -- Case of single wide character input function To_Set (Singleton : Wide_Character) return Wide_Character_Set is begin return (AF.Controlled with Set => new Wide_Character_Ranges'(1 => (Singleton, Singleton))); end To_Set; ----------- -- Value -- ----------- function Value (Map : Wide_Character_Mapping; Element : Wide_Character) return Wide_Character is L, R, M : Natural; MV : constant Wide_Character_Mapping_Values_Access := Map.Map; begin L := 1; R := MV.Domain'Last; -- Binary search loop loop -- If not found, identity if L > R then return Element; -- Otherwise do binary divide else M := (L + R) / 2; if Element < MV.Domain (M) then R := M - 1; elsif Element > MV.Domain (M) then L := M + 1; else -- Element = MV.Domain (M) then return MV.Rangev (M); end if; end if; end loop; end Value; end Ada.Strings.Wide_Maps;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2018, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ with nRF51.Device; with nRF51.SPI_Master; use nRF51.SPI_Master; package body MicroBit.SPI is Init_Done : Boolean := False; Device : SPI_Master renames nRF51.Device.SPI_Master_1; -- This device should not conflict with the device used in MicroBit.I2C -- See nRF51 Series Reference Manual, chapter Memory.Instantiation. ----------------- -- Initialized -- ----------------- function Initialized return Boolean is (Init_Done); ---------------- -- Initialize -- ---------------- procedure Initialize (S : Speed := S1Mbps; Mode : SPI_Mode := Mode_0) is begin Device.Configure (SCK => MB_SCK.Pin, MOSI => MB_MOSI.Pin, MISO => MB_MISO.Pin, Speed => (case S is when S125kbps => SPI_125kbps, when S250kbps => SPI_250kbps, when S500kbps => SPI_500kbps, when S1Mbps => SPI_1Mbps, when S2Mbps => SPI_2Mbps, when S4Mbps => SPI_4Mbps, when S8Mbps => SPI_8Mbps), Bit_Order => Most_Significant_First, Polarity => (case Mode is when Mode_0 | Mode_1 => Active_High, when Mode_2 | Mode_3 => Active_Low), Phase => (case Mode is when Mode_0 | Mode_2 => Sample_Leading_Edge, when Mode_1 | Mode_3 => Sample_Trailing_Edge)); Device.Enable; Init_Done := True; end Initialize; ---------------- -- Controller -- ---------------- function Controller return not null Any_SPI_Port is (Device'Access); end MicroBit.SPI;
----------------------------------------------------------------------- -- akt-commands-password-remove -- Remove a wallet password -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Text_IO; package body AKT.Commands.Password.Remove is use type Keystore.Header_Slot_Count_Type; use type Keystore.Passwords.Keys.Key_Provider_Access; function Get_Slot (Value : in String) return Keystore.Key_Slot; function Get_Slot (Value : in String) return Keystore.Key_Slot is begin return Keystore.Key_Slot'Value (Value); exception when others => AKT.Commands.Log.Error (-("Invalid key slot number. " & "It must be a number in range 1..7.")); raise Error; end Get_Slot; -- ------------------------------ -- Remove the wallet password. -- ------------------------------ overriding procedure Execute (Command : in out Command_Type; Name : in String; Args : in Argument_List'Class; Context : in out Context_Type) is pragma Unreferenced (Name); Path : constant String := Context.Get_Keystore_Path (Args); Slot : constant Keystore.Key_Slot := Get_Slot (Command.Slot.all); begin Setup_Password_Provider (Context); Setup_Key_Provider (Context); Context.Wallet.Open (Path => Path, Info => Context.Info); if not Context.No_Password_Opt or else Context.Info.Header_Count = 0 then if Context.Key_Provider /= null then Context.Wallet.Set_Master_Key (Context.Key_Provider.all); end if; Context.Wallet.Unlock (Context.Provider.all, Context.Slot); Context.Wallet.Remove_Key (Password => Context.Provider.all, Slot => Slot, Force => Command.Force); else Context.GPG.Load_Secrets (Context.Wallet); Context.Wallet.Set_Master_Key (Context.GPG); Context.Wallet.Unlock (Context.GPG, Context.Slot); Context.Wallet.Remove_Key (Password => Context.GPG, Slot => Slot, Force => Command.Force); end if; Ada.Text_IO.Put_Line (-("The password was successfully removed.")); exception when Keystore.Used_Key_Slot => AKT.Commands.Log.Error (-("Refusing to erase the key slot used by current password.")); AKT.Commands.Log.Error (-("Use the --force option if you really want " & "to erase this slot.")); raise Error; end Execute; -- ------------------------------ -- Setup the command before parsing the arguments and executing it. -- ------------------------------ procedure Setup (Command : in out Command_Type; Config : in out GNAT.Command_Line.Command_Line_Configuration; Context : in out Context_Type) is package GC renames GNAT.Command_Line; begin Drivers.Command_Type (Command).Setup (Config, Context); GC.Define_Switch (Config => Config, Output => Command.Force'Access, Switch => "-f", Long_Switch => "--force", Help => -("Force erase of password used to unlock the keystore")); GC.Define_Switch (Config => Config, Output => Command.Slot'Access, Switch => "-s:", Long_Switch => "--slot:", Argument => "SLOT", Help => -("Defines the key slot to erase (1..7)")); end Setup; end AKT.Commands.Password.Remove;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . S I G N A L S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2003-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides operations for querying and setting the blocked -- status of signals. -- This package is supported only on targets where Ada.Interrupts.Interrupt_ID -- corresponds to software signals on the target, and where System.Interrupts -- provides the ability to block and unblock signals. with Ada.Interrupts; package GNAT.Signals is procedure Block_Signal (Signal : Ada.Interrupts.Interrupt_ID); -- Block "Signal" at the process level procedure Unblock_Signal (Signal : Ada.Interrupts.Interrupt_ID); -- Unblock "Signal" at the process level function Is_Blocked (Signal : Ada.Interrupts.Interrupt_ID) return Boolean; -- "Signal" blocked at the process level? end GNAT.Signals;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics.Real_Arrays; use Ada.Numerics.Real_Arrays; with Ada.Numerics.Generic_Elementary_Functions; procedure QR is procedure Show (mat : Real_Matrix) is package FIO is new Ada.Text_IO.Float_IO (Float); begin for row in mat'Range (1) loop for col in mat'Range (2) loop FIO.Put (mat (row, col), Exp => 0, Aft => 4, Fore => 5); end loop; New_Line; end loop; end Show; function GetCol (mat : Real_Matrix; n : Integer) return Real_Matrix is column : Real_Matrix (mat'Range (1), 1 .. 1); begin for row in mat'Range (1) loop column (row, 1) := mat (row, n); end loop; return column; end GetCol; function Mag (mat : Real_Matrix) return Float is sum : Real_Matrix := Transpose (mat) * mat; package Math is new Ada.Numerics.Generic_Elementary_Functions (Float); begin return Math.Sqrt (sum (1, 1)); end Mag; function eVect (col : Real_Matrix; n : Integer) return Real_Matrix is vect : Real_Matrix (col'Range (1), 1 .. 1); begin for row in col'Range (1) loop if row /= n then vect (row, 1) := 0.0; else vect (row, 1) := 1.0; end if; end loop; return vect; end eVect; function Identity (n : Integer) return Real_Matrix is mat : Real_Matrix (1 .. n, 1 .. n) := (1 .. n => (others => 0.0)); begin for i in Integer range 1 .. n loop mat (i, i) := 1.0; end loop; return mat; end Identity; function Chop (mat : Real_Matrix; n : Integer) return Real_Matrix is small : Real_Matrix (n .. mat'Length (1), n .. mat'Length (2)); begin for row in small'Range (1) loop for col in small'Range (2) loop small (row, col) := mat (row, col); end loop; end loop; return small; end Chop; function H_n (inmat : Real_Matrix; n : Integer) return Real_Matrix is mat : Real_Matrix := Chop (inmat, n); col : Real_Matrix := GetCol (mat, n); colT : Real_Matrix (1 .. 1, mat'Range (1)); H : Real_Matrix := Identity (mat'Length (1)); Hall : Real_Matrix := Identity (inmat'Length (1)); begin col := col - Mag (col) * eVect (col, n); col := col / Mag (col); colT := Transpose (col); H := H - 2.0 * (col * colT); for row in H'Range (1) loop for col in H'Range (2) loop Hall (n - 1 + row, n - 1 + col) := H (row, col); end loop; end loop; return Hall; end H_n; A : constant Real_Matrix (1 .. 3, 1 .. 3) := ( (12.0, -51.0, 4.0), (6.0, 167.0, -68.0), (-4.0, 24.0, -41.0)); Q1, Q2, Q3, Q, R: Real_Matrix (1 .. 3, 1 .. 3); begin Q1 := H_n (A, 1); Q2 := H_n (Q1 * A, 2); Q3 := H_n (Q2 * Q1* A, 3); Q := Transpose (Q1) * Transpose (Q2) * TransPose(Q3); R := Q3 * Q2 * Q1 * A; Put_Line ("Q:"); Show (Q); Put_Line ("R:"); Show (R); end QR;
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form, except as embedded into a Nordic -- Semiconductor ASA integrated circuit in a product or a software update for -- such product, must reproduce the above copyright notice, this list of -- conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- -- 3. Neither the name of Nordic Semiconductor ASA nor the names of its -- contributors may be used to endorse or promote products derived from this -- software without specific prior written permission. -- -- 4. This software, with or without modification, must only be used with a -- Nordic Semiconductor ASA integrated circuit. -- -- 5. Any software provided in binary form under this license must not be reverse -- engineered, decompiled, modified and/or disassembled. -- -- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS -- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE -- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- This spec has been automatically generated from nrf52.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NRF_SVD.UART is pragma Preelaborate; --------------- -- Registers -- --------------- -- Shortcut between CTS event and STARTRX task type SHORTS_CTS_STARTRX_Field is (-- Disable shortcut Disabled, -- Enable shortcut Enabled) with Size => 1; for SHORTS_CTS_STARTRX_Field use (Disabled => 0, Enabled => 1); -- Shortcut between NCTS event and STOPRX task type SHORTS_NCTS_STOPRX_Field is (-- Disable shortcut Disabled, -- Enable shortcut Enabled) with Size => 1; for SHORTS_NCTS_STOPRX_Field use (Disabled => 0, Enabled => 1); -- Shortcut register type SHORTS_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Shortcut between CTS event and STARTRX task CTS_STARTRX : SHORTS_CTS_STARTRX_Field := NRF_SVD.UART.Disabled; -- Shortcut between NCTS event and STOPRX task NCTS_STOPRX : SHORTS_NCTS_STOPRX_Field := NRF_SVD.UART.Disabled; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SHORTS_Register use record Reserved_0_2 at 0 range 0 .. 2; CTS_STARTRX at 0 range 3 .. 3; NCTS_STOPRX at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; -- Write '1' to Enable interrupt for CTS event type INTENSET_CTS_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_CTS_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for CTS event type INTENSET_CTS_Field_1 is (-- Reset value for the field Intenset_Cts_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_CTS_Field_1 use (Intenset_Cts_Field_Reset => 0, Set => 1); -- Write '1' to Enable interrupt for NCTS event type INTENSET_NCTS_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_NCTS_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for NCTS event type INTENSET_NCTS_Field_1 is (-- Reset value for the field Intenset_Ncts_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_NCTS_Field_1 use (Intenset_Ncts_Field_Reset => 0, Set => 1); -- Write '1' to Enable interrupt for RXDRDY event type INTENSET_RXDRDY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_RXDRDY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for RXDRDY event type INTENSET_RXDRDY_Field_1 is (-- Reset value for the field Intenset_Rxdrdy_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_RXDRDY_Field_1 use (Intenset_Rxdrdy_Field_Reset => 0, Set => 1); -- Write '1' to Enable interrupt for TXDRDY event type INTENSET_TXDRDY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_TXDRDY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for TXDRDY event type INTENSET_TXDRDY_Field_1 is (-- Reset value for the field Intenset_Txdrdy_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_TXDRDY_Field_1 use (Intenset_Txdrdy_Field_Reset => 0, Set => 1); -- Write '1' to Enable interrupt for ERROR event type INTENSET_ERROR_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_ERROR_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for ERROR event type INTENSET_ERROR_Field_1 is (-- Reset value for the field Intenset_Error_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_ERROR_Field_1 use (Intenset_Error_Field_Reset => 0, Set => 1); -- Write '1' to Enable interrupt for RXTO event type INTENSET_RXTO_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENSET_RXTO_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Enable interrupt for RXTO event type INTENSET_RXTO_Field_1 is (-- Reset value for the field Intenset_Rxto_Field_Reset, -- Enable Set) with Size => 1; for INTENSET_RXTO_Field_1 use (Intenset_Rxto_Field_Reset => 0, Set => 1); -- Enable interrupt type INTENSET_Register is record -- Write '1' to Enable interrupt for CTS event CTS : INTENSET_CTS_Field_1 := Intenset_Cts_Field_Reset; -- Write '1' to Enable interrupt for NCTS event NCTS : INTENSET_NCTS_Field_1 := Intenset_Ncts_Field_Reset; -- Write '1' to Enable interrupt for RXDRDY event RXDRDY : INTENSET_RXDRDY_Field_1 := Intenset_Rxdrdy_Field_Reset; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Write '1' to Enable interrupt for TXDRDY event TXDRDY : INTENSET_TXDRDY_Field_1 := Intenset_Txdrdy_Field_Reset; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Write '1' to Enable interrupt for ERROR event ERROR : INTENSET_ERROR_Field_1 := Intenset_Error_Field_Reset; -- unspecified Reserved_10_16 : HAL.UInt7 := 16#0#; -- Write '1' to Enable interrupt for RXTO event RXTO : INTENSET_RXTO_Field_1 := Intenset_Rxto_Field_Reset; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENSET_Register use record CTS at 0 range 0 .. 0; NCTS at 0 range 1 .. 1; RXDRDY at 0 range 2 .. 2; Reserved_3_6 at 0 range 3 .. 6; TXDRDY at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; ERROR at 0 range 9 .. 9; Reserved_10_16 at 0 range 10 .. 16; RXTO at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Write '1' to Disable interrupt for CTS event type INTENCLR_CTS_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_CTS_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for CTS event type INTENCLR_CTS_Field_1 is (-- Reset value for the field Intenclr_Cts_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_CTS_Field_1 use (Intenclr_Cts_Field_Reset => 0, Clear => 1); -- Write '1' to Disable interrupt for NCTS event type INTENCLR_NCTS_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_NCTS_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for NCTS event type INTENCLR_NCTS_Field_1 is (-- Reset value for the field Intenclr_Ncts_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_NCTS_Field_1 use (Intenclr_Ncts_Field_Reset => 0, Clear => 1); -- Write '1' to Disable interrupt for RXDRDY event type INTENCLR_RXDRDY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_RXDRDY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for RXDRDY event type INTENCLR_RXDRDY_Field_1 is (-- Reset value for the field Intenclr_Rxdrdy_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_RXDRDY_Field_1 use (Intenclr_Rxdrdy_Field_Reset => 0, Clear => 1); -- Write '1' to Disable interrupt for TXDRDY event type INTENCLR_TXDRDY_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_TXDRDY_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for TXDRDY event type INTENCLR_TXDRDY_Field_1 is (-- Reset value for the field Intenclr_Txdrdy_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_TXDRDY_Field_1 use (Intenclr_Txdrdy_Field_Reset => 0, Clear => 1); -- Write '1' to Disable interrupt for ERROR event type INTENCLR_ERROR_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_ERROR_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for ERROR event type INTENCLR_ERROR_Field_1 is (-- Reset value for the field Intenclr_Error_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_ERROR_Field_1 use (Intenclr_Error_Field_Reset => 0, Clear => 1); -- Write '1' to Disable interrupt for RXTO event type INTENCLR_RXTO_Field is (-- Read: Disabled Disabled, -- Read: Enabled Enabled) with Size => 1; for INTENCLR_RXTO_Field use (Disabled => 0, Enabled => 1); -- Write '1' to Disable interrupt for RXTO event type INTENCLR_RXTO_Field_1 is (-- Reset value for the field Intenclr_Rxto_Field_Reset, -- Disable Clear) with Size => 1; for INTENCLR_RXTO_Field_1 use (Intenclr_Rxto_Field_Reset => 0, Clear => 1); -- Disable interrupt type INTENCLR_Register is record -- Write '1' to Disable interrupt for CTS event CTS : INTENCLR_CTS_Field_1 := Intenclr_Cts_Field_Reset; -- Write '1' to Disable interrupt for NCTS event NCTS : INTENCLR_NCTS_Field_1 := Intenclr_Ncts_Field_Reset; -- Write '1' to Disable interrupt for RXDRDY event RXDRDY : INTENCLR_RXDRDY_Field_1 := Intenclr_Rxdrdy_Field_Reset; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Write '1' to Disable interrupt for TXDRDY event TXDRDY : INTENCLR_TXDRDY_Field_1 := Intenclr_Txdrdy_Field_Reset; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Write '1' to Disable interrupt for ERROR event ERROR : INTENCLR_ERROR_Field_1 := Intenclr_Error_Field_Reset; -- unspecified Reserved_10_16 : HAL.UInt7 := 16#0#; -- Write '1' to Disable interrupt for RXTO event RXTO : INTENCLR_RXTO_Field_1 := Intenclr_Rxto_Field_Reset; -- unspecified Reserved_18_31 : HAL.UInt14 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for INTENCLR_Register use record CTS at 0 range 0 .. 0; NCTS at 0 range 1 .. 1; RXDRDY at 0 range 2 .. 2; Reserved_3_6 at 0 range 3 .. 6; TXDRDY at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; ERROR at 0 range 9 .. 9; Reserved_10_16 at 0 range 10 .. 16; RXTO at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Overrun error type ERRORSRC_OVERRUN_Field is (-- Read: error not present Notpresent, -- Read: error present Present) with Size => 1; for ERRORSRC_OVERRUN_Field use (Notpresent => 0, Present => 1); -- Parity error type ERRORSRC_PARITY_Field is (-- Read: error not present Notpresent, -- Read: error present Present) with Size => 1; for ERRORSRC_PARITY_Field use (Notpresent => 0, Present => 1); -- Framing error occurred type ERRORSRC_FRAMING_Field is (-- Read: error not present Notpresent, -- Read: error present Present) with Size => 1; for ERRORSRC_FRAMING_Field use (Notpresent => 0, Present => 1); -- Break condition type ERRORSRC_BREAK_Field is (-- Read: error not present Notpresent, -- Read: error present Present) with Size => 1; for ERRORSRC_BREAK_Field use (Notpresent => 0, Present => 1); -- Error source type ERRORSRC_Register is record -- Overrun error OVERRUN : ERRORSRC_OVERRUN_Field := NRF_SVD.UART.Notpresent; -- Parity error PARITY : ERRORSRC_PARITY_Field := NRF_SVD.UART.Notpresent; -- Framing error occurred FRAMING : ERRORSRC_FRAMING_Field := NRF_SVD.UART.Notpresent; -- Break condition BREAK : ERRORSRC_BREAK_Field := NRF_SVD.UART.Notpresent; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ERRORSRC_Register use record OVERRUN at 0 range 0 .. 0; PARITY at 0 range 1 .. 1; FRAMING at 0 range 2 .. 2; BREAK at 0 range 3 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; -- Enable or disable UART type ENABLE_ENABLE_Field is (-- Disable UART Disabled, -- Enable UART Enabled) with Size => 4; for ENABLE_ENABLE_Field use (Disabled => 0, Enabled => 4); -- Enable UART type ENABLE_Register is record -- Enable or disable UART ENABLE : ENABLE_ENABLE_Field := NRF_SVD.UART.Disabled; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ENABLE_Register use record ENABLE at 0 range 0 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; subtype RXD_RXD_Field is HAL.UInt8; -- RXD register type RXD_Register is record -- Read-only. *** Reading this field has side effects on other resources -- ***. RX data received in previous transfers, double buffered RXD : RXD_RXD_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RXD_Register use record RXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype TXD_TXD_Field is HAL.UInt8; -- TXD register type TXD_Register is record -- Write-only. TX data to be transferred TXD : TXD_TXD_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TXD_Register use record TXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Hardware flow control type CONFIG_HWFC_Field is (-- Disabled Disabled, -- Enabled Enabled) with Size => 1; for CONFIG_HWFC_Field use (Disabled => 0, Enabled => 1); -- Parity type CONFIG_PARITY_Field is (-- Exclude parity bit Excluded, -- Include parity bit Included) with Size => 3; for CONFIG_PARITY_Field use (Excluded => 0, Included => 7); -- Configuration of parity and hardware flow control type CONFIG_Register is record -- Hardware flow control HWFC : CONFIG_HWFC_Field := NRF_SVD.UART.Disabled; -- Parity PARITY : CONFIG_PARITY_Field := NRF_SVD.UART.Excluded; -- unspecified Reserved_4_31 : HAL.UInt28 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CONFIG_Register use record HWFC at 0 range 0 .. 0; PARITY at 0 range 1 .. 3; Reserved_4_31 at 0 range 4 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Universal Asynchronous Receiver/Transmitter type UART_Peripheral is record -- Start UART receiver TASKS_STARTRX : aliased HAL.UInt32; -- Stop UART receiver TASKS_STOPRX : aliased HAL.UInt32; -- Start UART transmitter TASKS_STARTTX : aliased HAL.UInt32; -- Stop UART transmitter TASKS_STOPTX : aliased HAL.UInt32; -- Suspend UART TASKS_SUSPEND : aliased HAL.UInt32; -- CTS is activated (set low). Clear To Send. EVENTS_CTS : aliased HAL.UInt32; -- CTS is deactivated (set high). Not Clear To Send. EVENTS_NCTS : aliased HAL.UInt32; -- Data received in RXD EVENTS_RXDRDY : aliased HAL.UInt32; -- Data sent from TXD EVENTS_TXDRDY : aliased HAL.UInt32; -- Error detected EVENTS_ERROR : aliased HAL.UInt32; -- Receiver timeout EVENTS_RXTO : aliased HAL.UInt32; -- Shortcut register SHORTS : aliased SHORTS_Register; -- Enable interrupt INTENSET : aliased INTENSET_Register; -- Disable interrupt INTENCLR : aliased INTENCLR_Register; -- Error source ERRORSRC : aliased ERRORSRC_Register; -- Enable UART ENABLE : aliased ENABLE_Register; -- Pin select for RTS PSELRTS : aliased HAL.UInt32; -- Pin select for TXD PSELTXD : aliased HAL.UInt32; -- Pin select for CTS PSELCTS : aliased HAL.UInt32; -- Pin select for RXD PSELRXD : aliased HAL.UInt32; -- RXD register RXD : aliased RXD_Register; -- TXD register TXD : aliased TXD_Register; -- Baud rate BAUDRATE : aliased HAL.UInt32; -- Configuration of parity and hardware flow control CONFIG : aliased CONFIG_Register; end record with Volatile; for UART_Peripheral use record TASKS_STARTRX at 16#0# range 0 .. 31; TASKS_STOPRX at 16#4# range 0 .. 31; TASKS_STARTTX at 16#8# range 0 .. 31; TASKS_STOPTX at 16#C# range 0 .. 31; TASKS_SUSPEND at 16#1C# range 0 .. 31; EVENTS_CTS at 16#100# range 0 .. 31; EVENTS_NCTS at 16#104# range 0 .. 31; EVENTS_RXDRDY at 16#108# range 0 .. 31; EVENTS_TXDRDY at 16#11C# range 0 .. 31; EVENTS_ERROR at 16#124# range 0 .. 31; EVENTS_RXTO at 16#144# range 0 .. 31; SHORTS at 16#200# range 0 .. 31; INTENSET at 16#304# range 0 .. 31; INTENCLR at 16#308# range 0 .. 31; ERRORSRC at 16#480# range 0 .. 31; ENABLE at 16#500# range 0 .. 31; PSELRTS at 16#508# range 0 .. 31; PSELTXD at 16#50C# range 0 .. 31; PSELCTS at 16#510# range 0 .. 31; PSELRXD at 16#514# range 0 .. 31; RXD at 16#518# range 0 .. 31; TXD at 16#51C# range 0 .. 31; BAUDRATE at 16#524# range 0 .. 31; CONFIG at 16#56C# range 0 .. 31; end record; -- Universal Asynchronous Receiver/Transmitter UART0_Periph : aliased UART_Peripheral with Import, Address => UART0_Base; end NRF_SVD.UART;
-- Copyright (c) 2013, Nordic Semiconductor ASA -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- -- * Redistributions in binary form must reproduce the above copyright notice, -- this list of conditions and the following disclaimer in the documentation -- and/or other materials provided with the distribution. -- -- * Neither the name of Nordic Semiconductor ASA nor the names of its -- contributors may be used to endorse or promote products derived from -- this software without specific prior written permission. -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- This spec has been automatically generated from nrf51.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NRF51_SVD.TWI is pragma Preelaborate; --------------- -- Registers -- --------------- -- Shortcut between BB event and the SUSPEND task. type SHORTS_BB_SUSPEND_Field is ( -- Shortcut disabled. Disabled, -- Shortcut enabled. Enabled) with Size => 1; for SHORTS_BB_SUSPEND_Field use (Disabled => 0, Enabled => 1); -- Shortcut between BB event and the STOP task. type SHORTS_BB_STOP_Field is ( -- Shortcut disabled. Disabled, -- Shortcut enabled. Enabled) with Size => 1; for SHORTS_BB_STOP_Field use (Disabled => 0, Enabled => 1); -- Shortcuts for TWI. type SHORTS_Register is record -- Shortcut between BB event and the SUSPEND task. BB_SUSPEND : SHORTS_BB_SUSPEND_Field := NRF51_SVD.TWI.Disabled; -- Shortcut between BB event and the STOP task. BB_STOP : SHORTS_BB_STOP_Field := NRF51_SVD.TWI.Disabled; -- unspecified Reserved_2_31 : HAL.UInt30 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SHORTS_Register use record BB_SUSPEND at 0 range 0 .. 0; BB_STOP at 0 range 1 .. 1; Reserved_2_31 at 0 range 2 .. 31; end record; -- Enable interrupt on STOPPED event. type INTENSET_STOPPED_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_STOPPED_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on STOPPED event. type INTENSET_STOPPED_Field_1 is ( -- Reset value for the field Intenset_Stopped_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_STOPPED_Field_1 use (Intenset_Stopped_Field_Reset => 0, Set => 1); -- Enable interrupt on READY event. type INTENSET_RXDREADY_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_RXDREADY_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on READY event. type INTENSET_RXDREADY_Field_1 is ( -- Reset value for the field Intenset_Rxdready_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_RXDREADY_Field_1 use (Intenset_Rxdready_Field_Reset => 0, Set => 1); -- Enable interrupt on TXDSENT event. type INTENSET_TXDSENT_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_TXDSENT_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on TXDSENT event. type INTENSET_TXDSENT_Field_1 is ( -- Reset value for the field Intenset_Txdsent_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_TXDSENT_Field_1 use (Intenset_Txdsent_Field_Reset => 0, Set => 1); -- Enable interrupt on ERROR event. type INTENSET_ERROR_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_ERROR_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on ERROR event. type INTENSET_ERROR_Field_1 is ( -- Reset value for the field Intenset_Error_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_ERROR_Field_1 use (Intenset_Error_Field_Reset => 0, Set => 1); -- Enable interrupt on BB event. type INTENSET_BB_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_BB_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on BB event. type INTENSET_BB_Field_1 is ( -- Reset value for the field Intenset_Bb_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_BB_Field_1 use (Intenset_Bb_Field_Reset => 0, Set => 1); -- Enable interrupt on SUSPENDED event. type INTENSET_SUSPENDED_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENSET_SUSPENDED_Field use (Disabled => 0, Enabled => 1); -- Enable interrupt on SUSPENDED event. type INTENSET_SUSPENDED_Field_1 is ( -- Reset value for the field Intenset_Suspended_Field_Reset, -- Enable interrupt on write. Set) with Size => 1; for INTENSET_SUSPENDED_Field_1 use (Intenset_Suspended_Field_Reset => 0, Set => 1); -- Interrupt enable set register. type INTENSET_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Enable interrupt on STOPPED event. STOPPED : INTENSET_STOPPED_Field_1 := Intenset_Stopped_Field_Reset; -- Enable interrupt on READY event. RXDREADY : INTENSET_RXDREADY_Field_1 := Intenset_Rxdready_Field_Reset; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Enable interrupt on TXDSENT event. TXDSENT : INTENSET_TXDSENT_Field_1 := Intenset_Txdsent_Field_Reset; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Enable interrupt on ERROR event. ERROR : INTENSET_ERROR_Field_1 := Intenset_Error_Field_Reset; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- Enable interrupt on BB event. BB : INTENSET_BB_Field_1 := Intenset_Bb_Field_Reset; -- unspecified Reserved_15_17 : HAL.UInt3 := 16#0#; -- Enable interrupt on SUSPENDED event. SUSPENDED : INTENSET_SUSPENDED_Field_1 := Intenset_Suspended_Field_Reset; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for INTENSET_Register use record Reserved_0_0 at 0 range 0 .. 0; STOPPED at 0 range 1 .. 1; RXDREADY at 0 range 2 .. 2; Reserved_3_6 at 0 range 3 .. 6; TXDSENT at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; ERROR at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; BB at 0 range 14 .. 14; Reserved_15_17 at 0 range 15 .. 17; SUSPENDED at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- Disable interrupt on STOPPED event. type INTENCLR_STOPPED_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_STOPPED_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on STOPPED event. type INTENCLR_STOPPED_Field_1 is ( -- Reset value for the field Intenclr_Stopped_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_STOPPED_Field_1 use (Intenclr_Stopped_Field_Reset => 0, Clear => 1); -- Disable interrupt on RXDREADY event. type INTENCLR_RXDREADY_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_RXDREADY_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on RXDREADY event. type INTENCLR_RXDREADY_Field_1 is ( -- Reset value for the field Intenclr_Rxdready_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_RXDREADY_Field_1 use (Intenclr_Rxdready_Field_Reset => 0, Clear => 1); -- Disable interrupt on TXDSENT event. type INTENCLR_TXDSENT_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_TXDSENT_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on TXDSENT event. type INTENCLR_TXDSENT_Field_1 is ( -- Reset value for the field Intenclr_Txdsent_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_TXDSENT_Field_1 use (Intenclr_Txdsent_Field_Reset => 0, Clear => 1); -- Disable interrupt on ERROR event. type INTENCLR_ERROR_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_ERROR_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on ERROR event. type INTENCLR_ERROR_Field_1 is ( -- Reset value for the field Intenclr_Error_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_ERROR_Field_1 use (Intenclr_Error_Field_Reset => 0, Clear => 1); -- Disable interrupt on BB event. type INTENCLR_BB_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_BB_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on BB event. type INTENCLR_BB_Field_1 is ( -- Reset value for the field Intenclr_Bb_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_BB_Field_1 use (Intenclr_Bb_Field_Reset => 0, Clear => 1); -- Disable interrupt on SUSPENDED event. type INTENCLR_SUSPENDED_Field is ( -- Interrupt disabled. Disabled, -- Interrupt enabled. Enabled) with Size => 1; for INTENCLR_SUSPENDED_Field use (Disabled => 0, Enabled => 1); -- Disable interrupt on SUSPENDED event. type INTENCLR_SUSPENDED_Field_1 is ( -- Reset value for the field Intenclr_Suspended_Field_Reset, -- Disable interrupt on write. Clear) with Size => 1; for INTENCLR_SUSPENDED_Field_1 use (Intenclr_Suspended_Field_Reset => 0, Clear => 1); -- Interrupt enable clear register. type INTENCLR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- Disable interrupt on STOPPED event. STOPPED : INTENCLR_STOPPED_Field_1 := Intenclr_Stopped_Field_Reset; -- Disable interrupt on RXDREADY event. RXDREADY : INTENCLR_RXDREADY_Field_1 := Intenclr_Rxdready_Field_Reset; -- unspecified Reserved_3_6 : HAL.UInt4 := 16#0#; -- Disable interrupt on TXDSENT event. TXDSENT : INTENCLR_TXDSENT_Field_1 := Intenclr_Txdsent_Field_Reset; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Disable interrupt on ERROR event. ERROR : INTENCLR_ERROR_Field_1 := Intenclr_Error_Field_Reset; -- unspecified Reserved_10_13 : HAL.UInt4 := 16#0#; -- Disable interrupt on BB event. BB : INTENCLR_BB_Field_1 := Intenclr_Bb_Field_Reset; -- unspecified Reserved_15_17 : HAL.UInt3 := 16#0#; -- Disable interrupt on SUSPENDED event. SUSPENDED : INTENCLR_SUSPENDED_Field_1 := Intenclr_Suspended_Field_Reset; -- unspecified Reserved_19_31 : HAL.UInt13 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for INTENCLR_Register use record Reserved_0_0 at 0 range 0 .. 0; STOPPED at 0 range 1 .. 1; RXDREADY at 0 range 2 .. 2; Reserved_3_6 at 0 range 3 .. 6; TXDSENT at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; ERROR at 0 range 9 .. 9; Reserved_10_13 at 0 range 10 .. 13; BB at 0 range 14 .. 14; Reserved_15_17 at 0 range 15 .. 17; SUSPENDED at 0 range 18 .. 18; Reserved_19_31 at 0 range 19 .. 31; end record; -- Byte received in RXD register before read of the last received byte -- (data loss). type ERRORSRC_OVERRUN_Field is ( -- Error not present. Notpresent, -- Error present. Present) with Size => 1; for ERRORSRC_OVERRUN_Field use (Notpresent => 0, Present => 1); -- Byte received in RXD register before read of the last received byte -- (data loss). type ERRORSRC_OVERRUN_Field_1 is ( -- Reset value for the field Errorsrc_Overrun_Field_Reset, -- Clear error on write. Clear) with Size => 1; for ERRORSRC_OVERRUN_Field_1 use (Errorsrc_Overrun_Field_Reset => 0, Clear => 1); -- NACK received after sending the address. type ERRORSRC_ANACK_Field is ( -- Error not present. Notpresent, -- Error present. Present) with Size => 1; for ERRORSRC_ANACK_Field use (Notpresent => 0, Present => 1); -- NACK received after sending the address. type ERRORSRC_ANACK_Field_1 is ( -- Reset value for the field Errorsrc_Anack_Field_Reset, -- Clear error on write. Clear) with Size => 1; for ERRORSRC_ANACK_Field_1 use (Errorsrc_Anack_Field_Reset => 0, Clear => 1); -- NACK received after sending a data byte. type ERRORSRC_DNACK_Field is ( -- Error not present. Notpresent, -- Error present. Present) with Size => 1; for ERRORSRC_DNACK_Field use (Notpresent => 0, Present => 1); -- NACK received after sending a data byte. type ERRORSRC_DNACK_Field_1 is ( -- Reset value for the field Errorsrc_Dnack_Field_Reset, -- Clear error on write. Clear) with Size => 1; for ERRORSRC_DNACK_Field_1 use (Errorsrc_Dnack_Field_Reset => 0, Clear => 1); -- Two-wire error source. Write error field to 1 to clear error. type ERRORSRC_Register is record -- Byte received in RXD register before read of the last received byte -- (data loss). OVERRUN : ERRORSRC_OVERRUN_Field_1 := Errorsrc_Overrun_Field_Reset; -- NACK received after sending the address. ANACK : ERRORSRC_ANACK_Field_1 := Errorsrc_Anack_Field_Reset; -- NACK received after sending a data byte. DNACK : ERRORSRC_DNACK_Field_1 := Errorsrc_Dnack_Field_Reset; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ERRORSRC_Register use record OVERRUN at 0 range 0 .. 0; ANACK at 0 range 1 .. 1; DNACK at 0 range 2 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; -- Enable or disable W2M type ENABLE_ENABLE_Field is ( -- Disabled. Disabled, -- Enabled. Enabled) with Size => 3; for ENABLE_ENABLE_Field use (Disabled => 0, Enabled => 5); -- Enable two-wire master. type ENABLE_Register is record -- Enable or disable W2M ENABLE : ENABLE_ENABLE_Field := NRF51_SVD.TWI.Disabled; -- unspecified Reserved_3_31 : HAL.UInt29 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ENABLE_Register use record ENABLE at 0 range 0 .. 2; Reserved_3_31 at 0 range 3 .. 31; end record; subtype RXD_RXD_Field is HAL.UInt8; -- RX data register. type RXD_Register is record -- Read-only. *** Reading this field has side effects on other resources -- ***. RX data from last transfer. RXD : RXD_RXD_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for RXD_Register use record RXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype TXD_TXD_Field is HAL.UInt8; -- TX data register. type TXD_Register is record -- TX data for next transfer. TXD : TXD_TXD_Field := 16#0#; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for TXD_Register use record TXD at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype ADDRESS_ADDRESS_Field is HAL.UInt7; -- Address used in the two-wire transfer. type ADDRESS_Register is record -- Two-wire address. ADDRESS : ADDRESS_ADDRESS_Field := 16#0#; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ADDRESS_Register use record ADDRESS at 0 range 0 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- Peripheral power control. type POWER_POWER_Field is ( -- Module power disabled. Disabled, -- Module power enabled. Enabled) with Size => 1; for POWER_POWER_Field use (Disabled => 0, Enabled => 1); -- Peripheral power control. type POWER_Register is record -- Peripheral power control. POWER : POWER_POWER_Field := NRF51_SVD.TWI.Disabled; -- unspecified Reserved_1_31 : HAL.UInt31 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for POWER_Register use record POWER at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Two-wire interface master 0. type TWI_Peripheral is record -- Start 2-Wire master receive sequence. TASKS_STARTRX : aliased HAL.UInt32; -- Start 2-Wire master transmit sequence. TASKS_STARTTX : aliased HAL.UInt32; -- Stop 2-Wire transaction. TASKS_STOP : aliased HAL.UInt32; -- Suspend 2-Wire transaction. TASKS_SUSPEND : aliased HAL.UInt32; -- Resume 2-Wire transaction. TASKS_RESUME : aliased HAL.UInt32; -- Two-wire stopped. EVENTS_STOPPED : aliased HAL.UInt32; -- Two-wire ready to deliver new RXD byte received. EVENTS_RXDREADY : aliased HAL.UInt32; -- Two-wire finished sending last TXD byte. EVENTS_TXDSENT : aliased HAL.UInt32; -- Two-wire error detected. EVENTS_ERROR : aliased HAL.UInt32; -- Two-wire byte boundary. EVENTS_BB : aliased HAL.UInt32; -- Two-wire suspended. EVENTS_SUSPENDED : aliased HAL.UInt32; -- Shortcuts for TWI. SHORTS : aliased SHORTS_Register; -- Interrupt enable set register. INTENSET : aliased INTENSET_Register; -- Interrupt enable clear register. INTENCLR : aliased INTENCLR_Register; -- Two-wire error source. Write error field to 1 to clear error. ERRORSRC : aliased ERRORSRC_Register; -- Enable two-wire master. ENABLE : aliased ENABLE_Register; -- Pin select for SCL. PSELSCL : aliased HAL.UInt32; -- Pin select for SDA. PSELSDA : aliased HAL.UInt32; -- RX data register. RXD : aliased RXD_Register; -- TX data register. TXD : aliased TXD_Register; -- Two-wire frequency. FREQUENCY : aliased HAL.UInt32; -- Address used in the two-wire transfer. ADDRESS : aliased ADDRESS_Register; -- Peripheral power control. POWER : aliased POWER_Register; end record with Volatile; for TWI_Peripheral use record TASKS_STARTRX at 16#0# range 0 .. 31; TASKS_STARTTX at 16#8# range 0 .. 31; TASKS_STOP at 16#14# range 0 .. 31; TASKS_SUSPEND at 16#1C# range 0 .. 31; TASKS_RESUME at 16#20# range 0 .. 31; EVENTS_STOPPED at 16#104# range 0 .. 31; EVENTS_RXDREADY at 16#108# range 0 .. 31; EVENTS_TXDSENT at 16#11C# range 0 .. 31; EVENTS_ERROR at 16#124# range 0 .. 31; EVENTS_BB at 16#138# range 0 .. 31; EVENTS_SUSPENDED at 16#148# range 0 .. 31; SHORTS at 16#200# range 0 .. 31; INTENSET at 16#304# range 0 .. 31; INTENCLR at 16#308# range 0 .. 31; ERRORSRC at 16#4C4# range 0 .. 31; ENABLE at 16#500# range 0 .. 31; PSELSCL at 16#508# range 0 .. 31; PSELSDA at 16#50C# range 0 .. 31; RXD at 16#518# range 0 .. 31; TXD at 16#51C# range 0 .. 31; FREQUENCY at 16#524# range 0 .. 31; ADDRESS at 16#588# range 0 .. 31; POWER at 16#FFC# range 0 .. 31; end record; -- Two-wire interface master 0. TWI0_Periph : aliased TWI_Peripheral with Import, Address => System'To_Address (16#40003000#); -- Two-wire interface master 1. TWI1_Periph : aliased TWI_Peripheral with Import, Address => System'To_Address (16#40004000#); end NRF51_SVD.TWI;
----------------------------------------------------------------------- -- awa-blogs-tests -- Unit tests for blogs module -- Copyright (C) 2011, 2012, 2013, 2014, 2015, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Test_Caller; with ADO; with Security.Contexts; with AWA.Services.Contexts; with AWA.Blogs.Modules; with AWA.Tests.Helpers.Users; package body AWA.Blogs.Modules.Tests is use ADO; package Caller is new Util.Test_Caller (Test, "Blogs.Services"); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test AWA.Blogs.Services.Create_Blog", Test_Create_Blog'Access); Caller.Add_Test (Suite, "Test AWA.Blogs.Services.Create_Post", Test_Create_Post'Access); end Add_Tests; -- ------------------------------ -- Test creation of a blog -- ------------------------------ procedure Test_Create_Blog (T : in out Test) is Manager : AWA.Blogs.Modules.Blog_Module_Access; Blog_Id : ADO.Identifier; Sec_Ctx : Security.Contexts.Security_Context; Context : AWA.Services.Contexts.Service_Context; begin AWA.Tests.Helpers.Users.Login (Context, Sec_Ctx, "test-blog@test.com"); Manager := AWA.Blogs.Modules.Get_Blog_Module; Manager.Create_Blog (Title => "My blog", Result => Blog_Id); T.Assert (Blog_Id > 0, "Invalid blog identifier"); end Test_Create_Blog; -- ------------------------------ -- Test creating and updating of a blog post -- ------------------------------ procedure Test_Create_Post (T : in out Test) is Manager : AWA.Blogs.Modules.Blog_Module_Access; Blog_Id : ADO.Identifier; Post_Id : ADO.Identifier; Sec_Ctx : Security.Contexts.Security_Context; Context : AWA.Services.Contexts.Service_Context; begin AWA.Tests.Helpers.Users.Login (Context, Sec_Ctx, "test-blog-post@test.com"); Manager := AWA.Blogs.Modules.Get_Blog_Module; Manager.Create_Blog (Title => "My blog post", Result => Blog_Id); T.Assert (Blog_Id > 0, "Invalid blog identifier"); for I in 1 .. 5 loop Manager.Create_Post (Blog_Id => Blog_Id, Title => "Testing blog title", URI => "testing-blog-title", Text => "The blog content", Summary => "Summary", Format => AWA.Blogs.Models.FORMAT_DOTCLEAR, Comment => False, Status => AWA.Blogs.Models.POST_DRAFT, Result => Post_Id); T.Assert (Post_Id > 0, "Invalid post identifier"); Manager.Update_Post (Post_Id => Post_Id, Title => "New blog post title", URI => "testing-blog-title", Text => "The new post content", Summary => "New summary", Format => AWA.Blogs.Models.FORMAT_DOTCLEAR, Publish_Date => ADO.Nullable_Time '(Is_Null => True, others => <>), Comment => True, Status => AWA.Blogs.Models.POST_DRAFT); -- Keep the last post in the database. exit when I = 5; Manager.Delete_Post (Post_Id => Post_Id); -- Verify that a Not_Found exception is raised if the post was deleted. begin Manager.Update_Post (Post_Id => Post_Id, Title => "Something", Text => "Content", Summary => "Summary", Format => AWA.Blogs.Models.FORMAT_DOTCLEAR, URI => "testing-blog-title", Publish_Date => ADO.Nullable_Time '(Is_Null => True, others => <>), Comment => True, Status => AWA.Blogs.Models.POST_DRAFT); T.Assert (False, "Exception Not_Found was not raised"); exception when Not_Found => null; end; -- Verify that a Not_Found exception is raised if the post was deleted. begin Manager.Delete_Post (Post_Id => Post_Id); T.Assert (False, "Exception Not_Found was not raised"); exception when Not_Found => null; end; end loop; end Test_Create_Post; end AWA.Blogs.Modules.Tests;
with Bounded_Dynamic_Strings; with afrl.cmasi.KeyValuePair; use afrl.cmasi.KeyValuePair; with Ada.Strings.Unbounded; with afrl.cmasi.AutomationResponse; use afrl.cmasi.AutomationResponse; package body UxAS.Comms.LMCP_Net_Client.Service.Automation_Request_Validation.SPARK with SPARK_Mode is function Prove_Same_Requests_Valid (This : Configuration_Data; R, S : My_UniqueAutomationRequest) return Boolean is (Valid_Automation_Request (This, S)) with Ghost, Global => null, Pre => Same_Requests (R, S) and then Valid_Automation_Request (This, R), Post => Prove_Same_Requests_Valid'Result; procedure Prove_Validity_Preserved (Data1, Data2 : Configuration_Data; R : My_UniqueAutomationRequest) with Ghost, Global => null, Pre => Data1 = Data2, Post => Valid_Automation_Request (Data1, R) = Valid_Automation_Request (Data2, R); procedure Prove_Validity_Preserved (Data1, Data2 : Configuration_Data; R_Queue : UniqueAutomationRequest_Lists.Formal_Model.M.Sequence) with Ghost, Global => null, Pre => Data1 = Data2, Post => (for all R of R_Queue => Valid_Automation_Request (Data1, R.Content) = Valid_Automation_Request (Data2, R.Content)); procedure Prove_Validity_Preserved (Data : Configuration_Data; R_Queue1, R_Queue2 : UniqueAutomationRequest_Lists.Formal_Model.M.Sequence) with Ghost, Global => null, Pre => Same_Requests (R_Queue1, R_Queue2), Post => (for all I in 1 .. UniqueAutomationRequest_Lists.Formal_Model.M.Length (R_Queue1) => Valid_Automation_Request (Data, UniqueAutomationRequest_Lists.Formal_Model.Element (R_Queue1, I).Content) = Valid_Automation_Request (Data, UniqueAutomationRequest_Lists.Formal_Model.Element (R_Queue2, I).Content)); procedure Prove_Validity_Preserved (Data1, Data2 : Configuration_Data; R : My_UniqueAutomationRequest) is null; procedure Prove_Validity_Preserved (Data1, Data2 : Configuration_Data; R_Queue : UniqueAutomationRequest_Lists.Formal_Model.M.Sequence) is use UniqueAutomationRequest_Lists.Formal_Model; begin for I in 1 .. M.Length (R_Queue) loop Prove_Validity_Preserved (Data1, Data2, M.Get (R_Queue, I).Content); pragma Loop_Invariant (for all J in 1 .. I => Valid_Automation_Request (Data1, M.Get (R_Queue, J).Content) = Valid_Automation_Request (Data2, M.Get (R_Queue, J).Content)); end loop; end Prove_Validity_Preserved; procedure Prove_Validity_Preserved (Data : Configuration_Data; R_Queue1, R_Queue2 : UniqueAutomationRequest_Lists.Formal_Model.M.Sequence) is null; procedure Send_Next_Request_Wrapper (This : in out Automation_Request_Validator_Service) with Post => This.Configs'Old = This.Configs and Same_Requests (UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks), UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)'Old) and Same_Requests (UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests), UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)'Old); -- Wrapper to add a contract to Send_Next_Request procedure Send_Next_Request_Wrapper (This : in out Automation_Request_Validator_Service) with SPARK_Mode => Off is begin This.Send_Next_Request; end Send_Next_Request_Wrapper; ----------------------------- -- Check_Tasks_Initialized -- ----------------------------- procedure Check_Tasks_Initialized (This : in out Automation_Request_Validator_Service) is -- checks to ensure all tasks are initialized for the requests in the 'task wait' queue -- if so, moves them to the 'pending' queue, otherwise sets a timer to wait AreAllTasksReady : Boolean := True; IsNewPendingRequest : Boolean := False; All_Requests_Valid_Old : constant Boolean := All_Requests_Valid (This) with Ghost; begin while AreAllTasksReady and then not UniqueAutomationRequest_Lists.Is_Empty (This.Requests_Waiting_For_Tasks) loop pragma Loop_Invariant (if All_Requests_Valid (This)'Loop_Entry then All_Requests_Valid (This)); declare use Int64_Vects; use UniqueAutomationRequest_Lists; TaskIds : constant Int64_Vect := Get_TaskList_From_OriginalRequest (First_Element (This.Requests_Waiting_For_Tasks).Content); Request_Q_Tmp : UniqueAutomationRequest_Ref_Deque with Ghost; use UniqueAutomationRequest_Lists.Formal_Model; begin for I in First_Index (TaskIds) .. Last_Index (TaskIds) loop declare use Int64_Sets; TaskId : constant Int64 := Element (TaskIds, I); ItStartedTaskId : constant Boolean := Contains (This.Configs.Available_Initialized_Tasks, taskId); begin if not itStartedTaskId then AreAllTasksReady := False; exit; end if; end; end loop; if AreAllTasksReady then -- move from 'task wait' queue IsNewPendingRequest := True; pragma Assert (if All_Requests_Valid_Old then Prove_Same_Requests_Valid (This.Configs, M.Get (Model (This.Requests_Waiting_For_Tasks), 1).Content, First_Element (This.Requests_Waiting_For_Tasks).Content)); Request_Q_Tmp := This.Pending_Requests; Append (This.Pending_Requests, First_Element (This.Requests_Waiting_For_Tasks)); pragma Assert (if All_Requests_Valid_Old then (for all I in 1 .. Length (Request_Q_Tmp) => Prove_Same_Requests_Valid (This.Configs, M.Get (Model (Request_Q_Tmp), I).Content, M.Get (Model (This.Pending_Requests), I).Content))); pragma Assert (if All_Requests_Valid_Old then Prove_Same_Requests_Valid (This.Configs, First_Element (This.Requests_Waiting_For_Tasks).Content, M.Get (Model (This.Pending_Requests), Length (This.Pending_Requests)).Content)); pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); Request_Q_Tmp := This.Requests_Waiting_For_Tasks; Delete_First (This.Requests_Waiting_For_Tasks); pragma Assert (if All_Requests_Valid_Old then (for all I in 1 .. Length (This.Requests_Waiting_For_Tasks) => Prove_Same_Requests_Valid (This.Configs, M.Get (Model (Request_Q_Tmp), I + 1).Content, M.Get (Model (This.Requests_Waiting_For_Tasks), I).Content))); -- re-set the task initialized check timer -- [Claire] ToDo : I could not find TimerManager -- uxas.Common.TimerManager::getInstance().startSingleShotTimer(m_taskInitTimerId, m_maxResponseTime_ms); pragma Compile_time_Warning (Standard.True, "Check_Tasks_Initialized is incomplete"); end if; end; end loop; pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); -- [Claire] ToDo : I could not find TimerManager -- if(isNewPendingRequest) if IsNewPendingRequest then -- { -- // if timer not started (i.e. not currently waiting for a response), -- // then send the one that just got added -- if(!uxas::common::TimerManager::getInstance().isTimerActive(m_responseTimerId)) -- { -- sendNextRequest(); declare Old_Confs : constant Configuration_Data := This.Configs with Ghost; Old_Pending_Request : constant UniqueAutomationRequest_Lists.Formal_Model.M.Sequence := UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests) with Ghost; Old_Waiting_Request : constant UniqueAutomationRequest_Lists.Formal_Model.M.Sequence := UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks) with Ghost; begin Send_Next_Request_Wrapper (This); Prove_Validity_Preserved (Old_Confs, Old_Waiting_Request, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)); Prove_Validity_Preserved (Old_Confs, Old_Pending_Request, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)); Prove_Validity_Preserved (Old_Confs, This.Configs, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)); Prove_Validity_Preserved (Old_Confs, This.Configs, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)); pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); end; -- } -- } -- else if(!uxas::common::TimerManager::getInstance().isTimerActive(m_taskInitTimerId) && !m_requestsWaitingForTasks.empty()) -- { -- // top of task-init queue is still not ready, start timer if not already started -- uxas::common::TimerManager::getInstance().startSingleShotTimer(m_taskInitTimerId, m_maxResponseTime_ms); -- } end if; -- if(m_requestsWaitingForTasks.empty()) -- { -- // all tasks have been initialized, so disable timer -- uxas::common::TimerManager::getInstance().disableTimer(m_taskInitTimerId, 0); -- } end Check_Tasks_Initialized; ------------------ -- Empty_Vector -- ------------------ function Empty_Vector return Int64_Vect is begin pragma Warnings (Off); return V : Int64_Vect do null; end return; pragma Warnings (On); end Empty_Vector; ------------------------------- -- Handle_Automation_Request -- ------------------------------- procedure Handle_Automation_Request (This : in out Automation_Request_Validator_Service; Auto_Request : My_Object_Any) is Request : Object'Class renames Deref (Auto_Request); UniqueAutomationReq : My_UniqueAutomationRequest; Id : Int64; All_Requests_Valid_Old : constant Boolean := All_Requests_Valid (This) with Ghost; begin pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); Get_Unique_Entity_Send_Message_Id (Id); setRequestID (UniqueAutomationReq, Id); pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); -- [Claire] Use membership test instead of IsImpactAutomationRequest if Request in ImpactAutomationRequest then declare Sand : ImpactAutomationRequest renames ImpactAutomationRequest (Request); Details : constant Request_Details := (RequestType => Sandbox_Automation_Request, Play_Id => Sand.getPlayID, Soln_Id => Sand.getSolutionID, Task_Request_Id => <>); begin setRequestID (UniqueAutomationReq, Sand.getRequestID); Int64_Request_Details_Maps.Insert (This.Sandbox, getRequestID (uniqueAutomationReq), Details); Copy_OriginalRequest_From_ImpactAutomationRequest (Target => UniqueAutomationReq, Source => Sand); end; pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); pragma Assert (Is_Corresponding_UniqueRequest (uniqueAutomationReq, Request)); -- [Claire] Use membership test instead of IsTaskAutomationRequest elsif Request in TaskAutomationRequest then declare TaskAutomationReq : TaskAutomationRequest renames TaskAutomationRequest (Request); Details : constant Request_Details := (RequestType => Task_Automation_Request, Task_Request_Id => TaskAutomationReq.getRequestID, others => <>); begin setRequestID (UniqueAutomationReq, TaskAutomationReq.getRequestID); Copy_OriginalRequest_From_TaskAutomationRequest (Target => UniqueAutomationReq, Source => TaskAutomationReq); Copy_PlanningState_From_TaskAutomationRequest (Target => UniqueAutomationReq, Source => TaskAutomationReq); Int64_Request_Details_Maps.Insert (This.Sandbox, getRequestID (uniqueAutomationReq), Details); end; pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); pragma Assert (Is_Corresponding_UniqueRequest (uniqueAutomationReq, Request)); else declare Details : constant Request_Details := (RequestType => Automation_Request, others => <>); begin Copy_OriginalRequest_From_AutomationRequest (Target => UniqueAutomationReq, Source => Auto_Request); Int64_Request_Details_Maps.Insert (This.Sandbox, getRequestID (uniqueAutomationReq), Details); end; pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); pragma Assert (Is_Corresponding_UniqueRequest (uniqueAutomationReq, Request)); end if; declare IsReady : Boolean; Request_Q_Tmp : UniqueAutomationRequest_Ref_Deque; use UniqueAutomationRequest_Lists; use UniqueAutomationRequest_Lists.Formal_Model; begin Check_Automation_Request_Requirements (This, UniqueAutomationReq, IsReady); pragma Assert (if All_Requests_Valid_Old then All_Requests_Valid (This)); if IsReady then Request_Q_Tmp := This.Requests_Waiting_For_Tasks; Append (This.Requests_Waiting_For_Tasks, (Content => UniqueAutomationReq)); pragma Assert (Valid_Automation_Request (This.Configs, UniqueAutomationReq)); pragma Assert (if All_Requests_Valid_Old then (for all I in 1 ..UniqueAutomationRequest_Lists.Length (Request_Q_Tmp) => Prove_Same_Requests_Valid (This.Configs, M.Get (Model (Request_Q_Tmp), I).Content, M.Get (Model (This.Requests_Waiting_For_Tasks), I).Content))); pragma Assert (Prove_Same_Requests_Valid (This.Configs, UniqueAutomationReq, M.Get (Model (This.Requests_Waiting_For_Tasks), Length (This.Requests_Waiting_For_Tasks)).Content)); Check_Tasks_Initialized (This); end if; end; end Handle_Automation_Request; ------------------------------------------ -- IsCheckAutomationRequestRequirements -- ------------------------------------------ procedure Check_Automation_Request_Requirements (This : in out Automation_Request_Validator_Service; Request : My_UniqueAutomationRequest; IsReady : out Boolean) is procedure Send_Error_Response (This : in out Automation_Request_Validator_Service; Request : My_UniqueAutomationRequest; ReasonForFailure : Bounded_Dynamic_Strings.Sequence; ErrResponseID : out Int64) with Post => This.Configs'Old = This.Configs and Same_Requests (UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks), UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)'Old) and Same_Requests (UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests), UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)'Old); -- [Claire] Code factored out because of access types. ------------------------- -- Send_Error_Response -- ------------------------- procedure Send_Error_Response (This : in out Automation_Request_Validator_Service; Request : My_UniqueAutomationRequest; ReasonForFailure : Bounded_Dynamic_Strings.Sequence; ErrResponseID : out Int64) with SPARK_Mode => Off is KValuePair : constant KeyValuePair_Acc := new KeyValuePair; ErrResponse : constant UniqueAutomationResponse_Acc := new UniqueAutomationResponse; begin -- [Claire] ToDo : What is that? -- UXAS_LOG_WARN(reasonForFailure.str()); KValuePair.setKey (Ada.Strings.Unbounded.To_Unbounded_String ("RequestValidator")); KValuePair.setValue (Ada.Strings.Unbounded.To_Unbounded_String (Bounded_Dynamic_Strings.Value (ReasonForFailure))); if ErrResponse.getOriginalResponse = null then ErrResponse.setOriginalResponse (new AutomationResponse); end if; ErrResponse.setResponseID (getRequestID (Request)); afrl.cmasi.AutomationResponse.Vect_KeyValuePair_Acc.Append (ErrResponse.GetOriginalResponse.GetInfo.all, KValuePair); Send_Response(This, ErrResponse); ErrResponseID := ErrResponse.getResponseID; end Send_Error_Response; use Int64_Vects; use Bounded_Dynamic_Strings; ReasonForFailure : Sequence (100) := Instance (100, String'("Automation Request ID[" & Int64'Image (getRequestID (Request)) & "] Not Ready ::")); EntityIds : constant Int64_Vect := Get_EntityList_From_OriginalRequest (Request); begin IsReady := True; if not Is_Empty (EntityIds) then -- check for required entity configurations, if none are required, make sure there is at least one if not (Int64_Sets.Is_Empty (This.Configs.Available_Configuration_Entity_Ids)) then -- [Claire] Redundant check? if not Is_Empty (EntityIds) then for I in First_Index (EntityIds) .. Last_Index (EntityIds) loop declare use Int64_Sets; Id : constant Int64 := Element (EntityIds, I); begin if not Contains (This.Configs.Available_Configuration_Entity_Ids, Id) then Append (To => ReasonForFailure, Tail => String'("- EntityConfiguration for Entity Id[" & Int64'Image (id) & "] not available.")); IsReady := False; end if; pragma Loop_Invariant (IsReady = (for all K in First_Index (EntityIds) .. I => Contains (This.Configs.Available_Configuration_Entity_Ids, Element (EntityIds, K)))); end; end loop; end if; else Append (To => ReasonForFailure, Tail => "- No EntityConfigurations available." ); IsReady := False; end if; -- check for required entity states, if none are required, make sure there is at least one with matching configuration if not (Int64_Sets.Is_Empty (This.Configs.Available_State_Entity_Ids)) then for I in First_Index (EntityIds) .. Last_Index (EntityIds) loop pragma Loop_Invariant (IsReady = (IsReady'Loop_Entry and then ((for all K in First_Index (EntityIds) .. I - 1 => Int64_Sets.Contains (This.Configs.Available_State_Entity_Ids, Element (EntityIds, K)) or Contains (Get_PlanningStates_Ids (Request), Element (EntityIds, K)))))); declare use Int64_Sets; Id : constant Int64 := Element (EntityIds, I); IsReadyLocal : Boolean := false; begin if Contains (This.Configs.Available_State_Entity_Ids, Id) then IsReadyLocal := true; end if; if not IsReadyLocal then declare planningStateIds : constant Int64_Vect := Get_PlanningStates_Ids (Request); begin for I in First_Index (planningStateIds) .. Last_Index (planningStateIds) loop declare planningStateId : constant Int64 := Element (planningStateIds, I); begin if planningStateId = Id then pragma Assert (Contains (Get_PlanningStates_Ids (Request), Id)); IsReadyLocal := true; exit; end if; end; pragma Loop_Invariant (for all K in First_Index (planningStateIds) .. I => Element (planningStateIds, K) /= Id); end loop; end; end if; pragma Assert (IsReadyLocal = (Contains (This.Configs.Available_State_Entity_Ids, Element (EntityIds, I)) or Contains (Get_PlanningStates_Ids (Request), Element (EntityIds, I)))); if not IsReadyLocal then IsReady := False; Append (To => ReasonForFailure, Tail => "- EntityState for Entity Id[" & Int64'Image (id) & "] not available."); end if; end; end loop; pragma Assert (IsReady = Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request))); else Append (To => ReasonForFailure, Tail => "- No EntityStates available."); IsReady := False; pragma Assert (not (Int64_Sets.Contains (This.Configs.Available_State_Entity_Ids, Int64_Vects.First_Element (EntityIds)))); pragma Assert (not Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request))); end if; pragma Assert (IsReady = Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request))); else -- if(!uniqueAutomationRequest->getOriginalRequest()->getEntityList().empty()) pragma Assert (Is_Empty (EntityIds)); if not (Int64_Sets.Is_Empty (This.Configs.Available_Configuration_Entity_Ids)) and then not Int64_Sets.Is_Empty (This.Configs.Available_State_Entity_Ids) then declare IsFoundAMatch : Boolean := False; use Int64_Sets; use Int64_Sets.Formal_Model; use all type P.Map; use all type E.Sequence; begin -- [Claire] Should one of the loops be on This.Available_State_Entity_Ids ? -- I assumed so and corrected the loop. for Id1 in This.Configs.Available_Configuration_Entity_Ids loop pragma Loop_Invariant (for all K in 1 .. Get (Positions (This.Configs.Available_Configuration_Entity_Ids), Id1) - 1 => not Contains (This.Configs.Available_State_Entity_Ids, Get (Elements (This.Configs.Available_Configuration_Entity_Ids), K))); pragma Loop_Invariant (not IsFoundAMatch); for Id2 in This.Configs.Available_State_Entity_Ids loop if Element (This.Configs.Available_Configuration_Entity_Ids, Id1) = Element (This.Configs.Available_State_Entity_Ids, Id2) then IsFoundAMatch := True; exit; end if; pragma Loop_Invariant (for all K in 1 .. Get (Positions (This.Configs.Available_State_Entity_Ids), Id2) => Element (This.Configs.Available_Configuration_Entity_Ids, Id1) /= Get (Elements (This.Configs.Available_State_Entity_Ids), K)); pragma Loop_Invariant (not IsFoundAMatch); end loop; if IsFoundAMatch then exit; end if; end loop; if not IsFoundAMatch then Append (To => ReasonForFailure, Tail => "- No EntityStates that match EntityConfigurations are available."); IsReady := False; end if; end; else if Int64_Sets.Is_Empty (This.Configs.Available_Configuration_Entity_Ids) then Append (To => ReasonForFailure, Tail => "- No EntityConfigurations available." ); else Append (To => ReasonForFailure, Tail => "- No EntityStates available."); end if; IsReady := False; end if; pragma Assert (IsReady = Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request))); end if; pragma Assert_And_Cut (IsReady = Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request))); -- check for required operating region and keepin/keepout zones if Get_OperatingRegion_From_OriginalRequest (Request) /= 0 then declare use all type Int64_Operating_Region_Maps.Cursor; Pos : constant Int64_Operating_Region_Maps.Cursor := Find (This.Configs.Available_Operating_Regions, Get_OperatingRegion_From_OriginalRequest (Request)); begin if Pos /= Int64_Operating_Region_Maps.No_Element then pragma Assert (Contains (This.Configs.Available_Operating_Regions, Get_OperatingRegion_From_OriginalRequest (Request))); declare ItOperatingRegion : constant OperatingRegionAreas := Element (This.Configs.Available_Operating_Regions, Pos); KeepInAreas : constant Int64_Vect := ItOperatingRegion.KeepInAreas; KeepOutAreas : constant Int64_Vect := ItOperatingRegion.KeepOutAreas; use Int64_Sets; begin for I in First_Index (KeepInAreas) .. Last_Index (KeepInAreas) loop declare KeepInArea : constant Int64 := Element (KeepInAreas, I); begin if not Contains (This.Configs.Available_KeepIn_Zones_Ids, KeepInArea) then Append (To => ReasonForFailure, Tail => "- KeepInArea Id[" & Int64'Image (keepInArea) & "] not available."); IsReady := False; end if; pragma Loop_Invariant (IsReady = (IsReady'Loop_Entry and then (for all K in First_Index (KeepInAreas) .. I => Contains (This.Configs.Available_KeepIn_Zones_Ids, Element (KeepInAreas, K))))); end; end loop; for I in First_Index (KeepOutAreas) .. Last_Index (KeepOutAreas) loop declare KeepOutArea : constant Int64 := Element (KeepOutAreas, I); begin if not Contains (This.Configs.Available_KeepOut_Zones_Ids, KeepOutArea) then Append (To => ReasonForFailure, Tail => "- KeepOutArea Id[" & Int64'Image (keepOutArea) & "] not available."); IsReady := False; end if; pragma Loop_Invariant (IsReady = (IsReady'Loop_Entry and then (for all K in First_Index (KeepOutAreas) .. I => Contains (This.Configs.Available_KeepOut_Zones_Ids, Element (KeepOutAreas, K))))); end; end loop; end; pragma Assert (IsReady = (Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request)) and then Check_For_Required_Operating_Region_And_Keepin_Keepout_Zones (Operating_Region => Get_OperatingRegion_From_OriginalRequest (Request), Operating_Regions => This.Configs.Available_Operating_Regions, KeepIn_Zones_Ids => This.Configs.Available_KeepIn_Zones_Ids, KeepOut_Zones_Ids => This.Configs.Available_KeepOut_Zones_Ids))); else Append (To => ReasonForFailure, Tail => "- OperatingRegion Id[" & Int64'Image (Get_OperatingRegion_From_OriginalRequest (Request)) & "] not available."); IsReady := False; pragma Assert (not Check_For_Required_Operating_Region_And_Keepin_Keepout_Zones (Operating_Region => Get_OperatingRegion_From_OriginalRequest (Request), Operating_Regions => This.Configs.Available_Operating_Regions, KeepIn_Zones_Ids => This.Configs.Available_KeepIn_Zones_Ids, KeepOut_Zones_Ids => This.Configs.Available_KeepOut_Zones_Ids)); end if; end; end if; pragma Assert_And_Cut (IsReady = (Check_For_Required_Entity_Configurations (Entity_Ids => EntityIds, Configurations => This.Configs.Available_Configuration_Entity_Ids, States => This.Configs.Available_State_Entity_Ids, Planning_States => Get_PlanningStates_Ids (Request)) and then Check_For_Required_Operating_Region_And_Keepin_Keepout_Zones (Operating_Region => Get_OperatingRegion_From_OriginalRequest (Request), Operating_Regions => This.Configs.Available_Operating_Regions, KeepIn_Zones_Ids => This.Configs.Available_KeepIn_Zones_Ids, KeepOut_Zones_Ids => This.Configs.Available_KeepOut_Zones_Ids))); -- check for required tasks and task requirements declare TaskIds : constant Int64_Vect := Get_TaskList_From_OriginalRequest (Request); begin for I in First_Index (TaskIds) .. Last_Index (TaskIds) loop pragma Loop_Invariant (IsReady = (IsReady'Loop_Entry and then (for all K in First_Index (TaskIds) .. I - 1 => Int64_CMASI_Task_Maps.Contains (This.Configs.Available_Tasks, Element (TaskIds, K)) and then Check_For_Specific_Task_Requirements (Available_Area_of_Interest_Ids => This.Configs.Available_Area_of_Interest_Ids, Available_Line_of_Interest_Ids => This.Configs.Available_Line_of_Interest_Ids, Available_Point_of_Interest_Ids => This.Configs.Available_Point_of_Interest_Ids, ItTask => Int64_CMASI_Task_Maps.Element (This.Configs.Available_Tasks, Element (TaskIds, K)))))); declare use Int64_CMASI_Task_Maps; TaskId : constant Int64 := Element (TaskIds, I); Pos : constant Cursor := Find (This.Configs.Available_Tasks, TaskId); IsReadyPrev : constant Boolean := IsReady with Ghost; begin if Pos /= No_Element then declare ItTask : constant Task_Kind_And_Id := Element (This.Configs.Available_Tasks, Pos); use Int64_Sets; begin -- check for specific task requirements if ItTask.Kind = AngledAreaSearchTask then if ItTask.SearchAreaID /= 0 then if not Contains (This.Configs.Available_Area_of_Interest_Ids, ItTask.SearchAreaID) then Append (To => ReasonForFailure, Tail => "- AreaOfInterest Id[" & Int64'Image (ItTask.SearchAreaID) & "] not available."); IsReady := false; end if; end if; elsif ItTask.Kind = ImpactLineSearchTask then if ItTask.LineID /= 0 then if not Contains (This.Configs.Available_Line_of_Interest_Ids, ItTask.LineID) then Append (To => ReasonForFailure, Tail => "- LineOfInterest Id[" & Int64'Image (ItTask.LineID) & "] not available."); IsReady := False; end if; end if; elsif ItTask.Kind = ImpactPointSearchTask then if ItTask.SearchLocationID /= 0 then if not Contains (This.Configs.Available_Point_of_Interest_Ids, ItTask.SearchLocationID) then Append (To => ReasonForFailure, -- Point of interest ?? Tail => "- LineOfInterest Id[" & Int64'Image (ItTask.SearchLocationID) & "] not available."); IsReady := False; end if; end if; end if; pragma Assert (IsReady = (IsReadyPrev and then Check_For_Specific_Task_Requirements (Available_Area_of_Interest_Ids => This.Configs.Available_Area_of_Interest_Ids, Available_Line_of_Interest_Ids => This.Configs.Available_Line_of_Interest_Ids, Available_Point_of_Interest_Ids => This.Configs.Available_Point_of_Interest_Ids, ItTask => ItTask))); end; else pragma Assert (not Int64_CMASI_Task_Maps.Contains (This.Configs.Available_Tasks, TaskId)); Append (To => ReasonForFailure, Tail => "- Task with the Id[" & Int64'Image (TaskId) & "] is unknown. Ensure task description preceeds automation request."); IsReady := False; end if; pragma Assert (IsReady = (IsReadyPrev and then Int64_CMASI_Task_Maps.Contains (This.Configs.Available_Tasks, Element (TaskIds, I)) and then Check_For_Specific_Task_Requirements (Available_Area_of_Interest_Ids => This.Configs.Available_Area_of_Interest_Ids, Available_Line_of_Interest_Ids => This.Configs.Available_Line_of_Interest_Ids, Available_Point_of_Interest_Ids => This.Configs.Available_Point_of_Interest_Ids, ItTask => Int64_CMASI_Task_Maps.Element (This.Configs.Available_Tasks, Element (TaskIds, I))))); end; end loop; end; pragma Assert (IsReady = Valid_Automation_Request (This.Configs, Request)); if not IsReady then declare ErrResponseID : Int64; Old_Confs : constant Configuration_Data := This.Configs with Ghost; Old_Pending_Request : constant UniqueAutomationRequest_Lists.Formal_Model.M.Sequence := UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests) with Ghost; Old_Waiting_Request : constant UniqueAutomationRequest_Lists.Formal_Model.M.Sequence := UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks) with Ghost; begin Send_Error_Response (This, Request, ReasonForFailure, ErrResponseID); Prove_Validity_Preserved (Old_Confs, This.Configs, Request); Prove_Validity_Preserved (Old_Confs, Old_Pending_Request, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)); Prove_Validity_Preserved (Old_Confs, Old_Waiting_Request, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)); Prove_Validity_Preserved (Old_Confs, This.Configs, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Pending_Requests)); Prove_Validity_Preserved (Old_Confs, This.Configs, UniqueAutomationRequest_Lists.Formal_Model.Model (This.Requests_Waiting_For_Tasks)); Int64_Request_Details_Maps.Delete (This.Sandbox, ErrResponseID); end; end if; end Check_Automation_Request_Requirements; end UxAS.Comms.LMCP_Net_Client.Service.Automation_Request_Validation.SPARK;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2017, AdaCore -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions are -- -- met: -- -- 1. Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in -- -- the documentation and/or other materials provided with the -- -- distribution. -- -- 3. Neither the name of the copyright holder nor the names of its -- -- contributors may be used to endorse or promote products derived -- -- from this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -- -- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -- -- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -- -- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- -- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -- -- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ package MicroBit.IOs is type Pin_Id is range 0 .. 20; type IO_Features is (Digital, Analog, Touch); function Supports (Pin : Pin_Id; Feature : IO_Features) return Boolean is (case Feature is when Digital => (case Pin is when 0 .. 16 | 19 .. 20 => True, when others => False), when Analog => (case Pin is when 0 .. 4 | 10 => True, when others => False), when Touch => (case Pin is when 0 | 1 | 2 => True, when others => False)); procedure Set (Pin : Pin_Id; Value : Boolean) with Pre => Supports (Pin, Digital); function Set (Pin : Pin_Id) return Boolean with Pre => Supports (Pin, Digital); type Analog_Value is range 0 .. 1023; procedure Set_Analog_Period_Us (Period : Natural); -- Set the period (in microseconds) of the PWM signal for all analog output -- pins. procedure Write (Pin : Pin_Id; Value : Analog_Value) with Pre => Supports (Pin, Analog); function Analog (Pin : Pin_Id) return Analog_Value with Pre => Supports (Pin, Analog); -- Read the voltagle applied to the pin. 0 means 0V 1023 means 3.3V end MicroBit.IOs;
-- C34005U.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- FOR DERIVED MULTI-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT TYPE IS -- A LIMITED TYPE: -- CHECK THAT ALL VALUES OF THE PARENT (BASE) TYPE ARE PRESENT -- FOR THE DERIVED (BASE) TYPE WHEN THE DERIVED TYPE DEFINITION -- IS CONSTRAINED. -- CHECK THAT ANY CONSTRAINT IMPOSED ON THE PARENT SUBTYPE IS -- ALSO IMPOSED ON THE DERIVED SUBTYPE. -- HISTORY: -- JRK 08/21/87 CREATED ORIGINAL TEST. WITH REPORT; USE REPORT; PROCEDURE C34005U IS PACKAGE PKG_L IS TYPE LP IS LIMITED PRIVATE; FUNCTION CREATE (X : INTEGER) RETURN LP; FUNCTION VALUE (X : LP) RETURN INTEGER; FUNCTION EQUAL (X, Y : LP) RETURN BOOLEAN; PROCEDURE ASSIGN (X : OUT LP; Y : LP); C1 : CONSTANT LP; C2 : CONSTANT LP; C3 : CONSTANT LP; C4 : CONSTANT LP; C5 : CONSTANT LP; C6 : CONSTANT LP; C7 : CONSTANT LP; C8 : CONSTANT LP; PRIVATE TYPE LP IS NEW INTEGER; C1 : CONSTANT LP := 1; C2 : CONSTANT LP := 2; C3 : CONSTANT LP := 3; C4 : CONSTANT LP := 4; C5 : CONSTANT LP := 5; C6 : CONSTANT LP := 6; C7 : CONSTANT LP := 7; C8 : CONSTANT LP := 8; END PKG_L; USE PKG_L; SUBTYPE COMPONENT IS LP; PACKAGE PKG_P IS FIRST : CONSTANT := 0; LAST : CONSTANT := 10; SUBTYPE INDEX IS INTEGER RANGE FIRST .. LAST; TYPE PARENT IS ARRAY (INDEX RANGE <>, INDEX RANGE <>) OF COMPONENT; FUNCTION CREATE ( F1, L1 : INDEX; F2, L2 : INDEX; C : COMPONENT; DUMMY : PARENT -- TO RESOLVE OVERLOADING. ) RETURN PARENT; FUNCTION EQUAL (X, Y : PARENT) RETURN BOOLEAN; FUNCTION AGGR (A, B, C, D, E, F, G, H : COMPONENT) RETURN PARENT; END PKG_P; USE PKG_P; TYPE T IS NEW PARENT (IDENT_INT (4) .. IDENT_INT (5), IDENT_INT (6) .. IDENT_INT (8)); SUBTYPE SUBPARENT IS PARENT (4 .. 5, 6 .. 8); TYPE S IS NEW SUBPARENT; X : T; Y : S; PACKAGE BODY PKG_L IS FUNCTION CREATE (X : INTEGER) RETURN LP IS BEGIN RETURN LP (IDENT_INT (X)); END CREATE; FUNCTION VALUE (X : LP) RETURN INTEGER IS BEGIN RETURN INTEGER (X); END VALUE; FUNCTION EQUAL (X, Y : LP) RETURN BOOLEAN IS BEGIN RETURN X = Y; END EQUAL; PROCEDURE ASSIGN (X : OUT LP; Y : LP) IS BEGIN X := Y; END ASSIGN; END PKG_L; PACKAGE BODY PKG_P IS FUNCTION CREATE ( F1, L1 : INDEX; F2, L2 : INDEX; C : COMPONENT; DUMMY : PARENT ) RETURN PARENT IS A : PARENT (F1 .. L1, F2 .. L2); B : COMPONENT; BEGIN ASSIGN (B, C); FOR I IN F1 .. L1 LOOP FOR J IN F2 .. L2 LOOP ASSIGN (A (I, J), B); ASSIGN (B, CREATE (VALUE (B) + 1)); END LOOP; END LOOP; RETURN A; END CREATE; FUNCTION EQUAL (X, Y : PARENT) RETURN BOOLEAN IS BEGIN IF X'LENGTH /= Y'LENGTH OR X'LENGTH(2) /= Y'LENGTH(2) THEN RETURN FALSE; ELSE FOR I IN X'RANGE LOOP FOR J IN X'RANGE(2) LOOP IF NOT EQUAL (X (I, J), Y (I - X'FIRST + Y'FIRST, J - X'FIRST(2) + Y'FIRST(2))) THEN RETURN FALSE; END IF; END LOOP; END LOOP; END IF; RETURN TRUE; END EQUAL; FUNCTION AGGR (A, B, C, D, E, F, G, H : COMPONENT) RETURN PARENT IS X : PARENT (INDEX'FIRST .. INDEX'FIRST + 3, INDEX'FIRST .. INDEX'FIRST + 1); BEGIN ASSIGN (X (INDEX'FIRST , INDEX'FIRST ), A); ASSIGN (X (INDEX'FIRST , INDEX'FIRST + 1), B); ASSIGN (X (INDEX'FIRST + 1, INDEX'FIRST ), C); ASSIGN (X (INDEX'FIRST + 1, INDEX'FIRST + 1), D); ASSIGN (X (INDEX'FIRST + 2, INDEX'FIRST ), E); ASSIGN (X (INDEX'FIRST + 2, INDEX'FIRST + 1), F); ASSIGN (X (INDEX'FIRST + 3, INDEX'FIRST ), G); ASSIGN (X (INDEX'FIRST + 3, INDEX'FIRST + 1), H); RETURN X; END AGGR; END PKG_P; PROCEDURE ASSIGN (X : IN OUT T; Y : T) IS BEGIN FOR I IN X'RANGE LOOP FOR J IN X'RANGE(2) LOOP ASSIGN (X (I, J), Y (I, J)); END LOOP; END LOOP; END ASSIGN; PROCEDURE ASSIGN (X : IN OUT S; Y : S) IS BEGIN FOR I IN X'RANGE LOOP FOR J IN X'RANGE(2) LOOP ASSIGN (X (I, J), Y (I, J)); END LOOP; END LOOP; END ASSIGN; BEGIN TEST ("C34005U", "CHECK THAT ALL VALUES OF THE PARENT (BASE) " & "TYPE ARE PRESENT FOR THE DERIVED (BASE) TYPE " & "WHEN THE DERIVED TYPE DEFINITION IS " & "CONSTRAINED. ALSO CHECK THAT ANY CONSTRAINT " & "IMPOSED ON THE PARENT SUBTYPE IS ALSO IMPOSED " & "ON THE DERIVED SUBTYPE. CHECK FOR DERIVED " & "MULTI-DIMENSIONAL ARRAY TYPES WHOSE COMPONENT " & "TYPE IS A LIMITED TYPE"); FOR I IN X'RANGE LOOP FOR J IN X'RANGE(2) LOOP ASSIGN (X (I, J), C2); ASSIGN (Y (I, J), C2); END LOOP; END LOOP; -- CHECK THAT BASE TYPE VALUES NOT IN THE SUBTYPE ARE PRESENT. BEGIN IF NOT EQUAL (CREATE (6, 9, 2, 3, C1, X), AGGR (C1, C2, C3, C4, C5, C6, C7, C8)) OR NOT EQUAL (CREATE (6, 9, 2, 3, C1, Y), AGGR (C1, C2, C3, C4, C5, C6, C7, C8)) THEN FAILED ("CAN'T CREATE BASE TYPE VALUES OUTSIDE THE " & "SUBTYPE"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => FAILED ("CONSTRAINT_ERROR WHEN TRYING TO CREATE BASE " & "TYPE VALUES OUTSIDE THE SUBTYPE"); WHEN OTHERS => FAILED ("EXCEPTION WHEN TRYING TO CREATE BASE TYPE " & "VALUES OUTSIDE THE SUBTYPE"); END; IF AGGR (C1, C2, C3, C4, C5, C6, C7, C8) IN T OR AGGR (C1, C2, C3, C4, C5, C6, C7, C8) IN S THEN FAILED ("INCORRECT ""IN"""); END IF; -- CHECK THE DERIVED SUBTYPE CONSTRAINT. IF T'FIRST /= 4 OR T'LAST /= 5 OR S'FIRST /= 4 OR S'LAST /= 5 OR T'FIRST (2) /= 6 OR T'LAST (2) /= 8 OR S'FIRST (2) /= 6 OR S'LAST (2) /= 8 THEN FAILED ("INCORRECT 'FIRST OR 'LAST"); END IF; BEGIN ASSIGN (X, CREATE (4, 5, 6, 8, C1, X)); ASSIGN (Y, CREATE (4, 5, 6, 8, C1, Y)); IF NOT EQUAL (PARENT (X), PARENT (Y)) THEN -- USE X AND Y. FAILED ("INCORRECT CONVERSION TO PARENT"); END IF; EXCEPTION WHEN OTHERS => FAILED ("EXCEPTION RAISED BY OK ASSIGN CALL"); END; BEGIN ASSIGN (X, CREATE (4, 4, 6, 8, C1, X)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (X, CREATE (4, 4, 6, 8, C1, X))"); IF EQUAL (X, CREATE (4, 4, 6, 8, C1, X)) THEN -- USE X. COMMENT ("X ALTERED -- " & "ASSIGN (X, CREATE (4, 4, 6, 8, C1, X))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (X, CREATE (4, 4, 6, 8, C1, X))"); END; BEGIN ASSIGN (X, CREATE (4, 6, 6, 8, C1, X)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (X, CREATE (4, 6, 6, 8, C1, X))"); IF EQUAL (X, CREATE (4, 6, 6, 8, C1, X)) THEN -- USE X. COMMENT ("X ALTERED -- " & "ASSIGN (X, CREATE (4, 6, 6, 8, C1, X))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (X, CREATE (4, 6, 6, 8, C1, X))"); END; BEGIN ASSIGN (X, CREATE (4, 5, 6, 7, C1, X)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (X, CREATE (4, 5, 6, 7, C1, X))"); IF EQUAL (X, CREATE (4, 5, 6, 7, C1, X)) THEN -- USE X. COMMENT ("X ALTERED -- " & "ASSIGN (X, CREATE (4, 5, 6, 7, C1, X))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (X, CREATE (4, 5, 6, 7, C1, X))"); END; BEGIN ASSIGN (X, CREATE (4, 5, 6, 9, C1, X)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (X, CREATE (4, 5, 6, 9, C1, X))"); IF EQUAL (X, CREATE (4, 5, 6, 9, C1, X)) THEN -- USE X. COMMENT ("X ALTERED -- " & "ASSIGN (X, CREATE (4, 5, 6, 9, C1, X))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (X, CREATE (4, 5, 6, 9, C1, X))"); END; BEGIN ASSIGN (Y, CREATE (4, 4, 6, 8, C1, Y)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (Y, CREATE (4, 4, 6, 8, C1, Y))"); IF EQUAL (Y, CREATE (4, 4, 6, 8, C1, Y)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "ASSIGN (Y, CREATE (4, 4, 6, 8, C1, Y))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (Y, CREATE (4, 4, 6, 8, C1, Y))"); END; BEGIN ASSIGN (Y, CREATE (4, 6, 6, 8, C1, Y)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (Y, CREATE (4, 6, 6, 8, C1, Y))"); IF EQUAL (Y, CREATE (4, 6, 6, 8, C1, Y)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "ASSIGN (Y, CREATE (4, 6, 6, 8, C1, Y))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (Y, CREATE (4, 6, 6, 8, C1, Y))"); END; BEGIN ASSIGN (Y, CREATE (4, 5, 6, 7, C1, Y)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 7, C1, Y))"); IF EQUAL (Y, CREATE (4, 5, 6, 7, C1, Y)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 7, C1, Y))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 7, C1, Y))"); END; BEGIN ASSIGN (Y, CREATE (4, 5, 6, 9, C1, Y)); FAILED ("CONSTRAINT_ERROR NOT RAISED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 9, C1, Y))"); IF EQUAL (Y, CREATE (4, 5, 6, 9, C1, Y)) THEN -- USE Y. COMMENT ("Y ALTERED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 9, C1, Y))"); END IF; EXCEPTION WHEN CONSTRAINT_ERROR => NULL; WHEN OTHERS => FAILED ("WRONG EXCEPTION RAISED -- " & "ASSIGN (Y, CREATE (4, 5, 6, 9, C1, Y))"); END; RESULT; END C34005U;
pragma License (Unrestricted); with Ada.Numerics.Generic_Complex_Types; generic with package Complex_Types is new Generic_Complex_Types (<>); use Complex_Types; package Ada.Numerics.Generic_Complex_Elementary_Functions is pragma Pure; function Sqrt (X : Complex) return Complex; function Log (X : Complex) return Complex; function Exp (X : Complex) return Complex; function Exp (X : Imaginary) return Complex; function "**" (Left : Complex; Right : Complex) return Complex; function "**" (Left : Complex; Right : Real'Base) return Complex; function "**" (Left : Real'Base; Right : Complex) return Complex; pragma Inline (Sqrt); pragma Inline (Log); pragma Inline (Exp); pragma Inline ("**"); function Sin (X : Complex) return Complex; function Cos (X : Complex) return Complex; function Tan (X : Complex) return Complex; function Cot (X : Complex) return Complex; pragma Inline (Sin); pragma Inline (Cos); pragma Inline (Tan); function Arcsin (X : Complex) return Complex; function Arccos (X : Complex) return Complex; function Arctan (X : Complex) return Complex; function Arccot (X : Complex) return Complex; pragma Inline (Arcsin); pragma Inline (Arccos); pragma Inline (Arctan); function Sinh (X : Complex) return Complex; function Cosh (X : Complex) return Complex; function Tanh (X : Complex) return Complex; function Coth (X : Complex) return Complex; pragma Inline (Sinh); pragma Inline (Cosh); pragma Inline (Tanh); function Arcsinh (X : Complex) return Complex; function Arccosh (X : Complex) return Complex; function Arctanh (X : Complex) return Complex; function Arccoth (X : Complex) return Complex; pragma Inline (Arcsinh); pragma Inline (Arccosh); pragma Inline (Arctanh); end Ada.Numerics.Generic_Complex_Elementary_Functions;
-- Lumen.Events.Animate -- Event loop with frame-animation callback -- -- Chip Richards, NiEstu, Phoenix AZ, Spring 2010 -- This code is covered by the ISC License: -- -- Copyright © 2010, NiEstu -- -- Permission to use, copy, modify, and/or distribute this software for any -- purpose with or without fee is hereby granted, provided that the above -- copyright notice and this permission notice appear in all copies. -- -- The software is provided "as is" and the author disclaims all warranties -- with regard to this software including all implied warranties of -- merchantability and fitness. In no event shall the author be liable for any -- special, direct, indirect, or consequential damages or any damages -- whatsoever resulting from loss of use, data or profits, whether in an -- action of contract, negligence or other tortious action, arising out of or -- in connection with the use or performance of this software. -- Environment with Ada.Calendar; package body Lumen.Events.Animate is --------------------------------------------------------------------------- -- Module-local procedure to wait until next frame time, if necessary procedure Wait_Frame (Win : in Window_Handle) is use Ada.Calendar; Been : constant Duration := Clock - Win.Prior_Frame; begin -- Wait_Frame -- No special check needed for first frame, since the initial value -- (Never) is a long long time ago. if Been > Win.SPF then return; else delay Win.SPF - Been; end if; end Wait_Frame; --------------------------------------------------------------------------- -- Change FPS after window creation procedure Set_FPS (Win : in Window_Handle; FPS : in Frame_Count) is begin -- Set_FPS -- Check for special FPS value if FPS = Flat_Out then Win.SPF := 0.0; else Win.SPF := Duration (1.0) / Duration (FPS); end if; end Set_FPS; --------------------------------------------------------------------------- -- Function to fetch FPS (and reset rolling average if necessary) function FPS (Win : Window_Handle; Since : FPS_Type := FPS_Since_Prior) return Float is use Ada.Calendar; Elapsed : Duration; Frames : Frame_Count; begin -- FPS -- Pick which values to use based on caller's preference case Since is when FPS_Overall => Elapsed := Clock - Win.App_Start; Frames := Frame_Count (Win.App_Frames); when FPS_Since_Prior => Elapsed := Clock - Win.Last_Start; Frames := Frame_Count (Win.Last_Frames); -- Reset the last-called values Win.Last_Start := Clock; Win.Last_Frames := 0; end case; -- Calculate and return the frames per second return Float (Frames) / Float (Elapsed); end FPS; --------------------------------------------------------------------------- procedure Run (Win : in Window_Handle; FPS : in Frame_Count; Frame : in Event_Frame) is begin if FPS=Flat_Out then Win.SPF := 0.0; else Win.SPF := Duration(1.0) / Duration(FPS); end if; while Lumen.Window.Process_Events(Win) loop Wait_Frame(Win); declare use Ada.Calendar; begin exit when not Frame.all(Clock-Win.Prior_Frame); end; Win.Prior_Frame := Ada.Calendar.Clock; Win.App_Frames := Win.App_Frames+1; Win.Last_Frames := Win.Last_Frames+1; end loop; end Run; --------------------------------------------------------------------------- end Lumen.Events.Animate;
-- Copyright 2008-2014 Free Software Foundation, Inc. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. with Pck; use Pck; procedure Foo is Some_Local_Variable : Integer := 1; External_Identical_Two : Integer := 74; begin My_Global_Variable := Some_Local_Variable + 1; -- START Proc (External_Identical_Two); end Foo;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . W I D E _ U N B O U N D E D _ I O -- -- -- -- S p e c -- -- -- -- This specification is adapted from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ -- Note: historically GNAT provided these subprograms as a child of the -- package Ada.Strings.Wide_Unbounded. So we implement this new Ada 2005 -- package by renaming the subprograms in that child. This is a more -- straightforward implementation anyway, since we need access to the -- internal representation of Unbounded_Wide_String. with Ada.Strings.Wide_Unbounded; with Ada.Strings.Wide_Unbounded.Wide_Text_IO; package Ada.Wide_Text_IO.Wide_Unbounded_IO is procedure Put (File : File_Type; Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put; procedure Put (Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put; procedure Put_Line (File : Wide_Text_IO.File_Type; Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put_Line; procedure Put_Line (Item : Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Put_Line; function Get_Line (File : File_Type) return Strings.Wide_Unbounded.Unbounded_Wide_String renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; function Get_Line return Strings.Wide_Unbounded.Unbounded_Wide_String renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; procedure Get_Line (File : File_Type; Item : out Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; procedure Get_Line (Item : out Strings.Wide_Unbounded.Unbounded_Wide_String) renames Ada.Strings.Wide_Unbounded.Wide_Text_IO.Get_Line; end Ada.Wide_Text_IO.Wide_Unbounded_IO;
-- part of OpenGLAda, (c) 2017 Felix Krause -- released under the terms of the MIT license, see the file "COPYING" with GL.API; with GL.Enums.Getter; package body GL.Culling is procedure Set_Front_Face (Face : Orientation) renames API.Front_Face; function Front_Face return Orientation is Ret : aliased Orientation; begin API.Get_Orientation (Enums.Getter.Front_Face, Ret'Access); Raise_Exception_On_OpenGL_Error; return Ret; end Front_Face; procedure Set_Cull_Face (Selector : Face_Selector) renames API.Cull_Face; function Cull_Face return Face_Selector is Ret : aliased Face_Selector; begin API.Get_Face_Selector (Enums.Getter.Cull_Face_Mode, Ret'Access); Raise_Exception_On_OpenGL_Error; return Ret; end Cull_Face; end GL.Culling;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . S T R I N G S . W I D E _ F I X E D -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Ada.Strings.Wide_Maps; use Ada.Strings.Wide_Maps; with Ada.Strings.Wide_Search; package body Ada.Strings.Wide_Fixed is ------------------------ -- Search Subprograms -- ------------------------ function Index (Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural renames Ada.Strings.Wide_Search.Index; function Index (Source : Wide_String; Pattern : Wide_String; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural renames Ada.Strings.Wide_Search.Index; function Index (Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; Test : Membership := Inside; Going : Direction := Forward) return Natural renames Ada.Strings.Wide_Search.Index; function Index (Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural renames Ada.Strings.Wide_Search.Index; function Index (Source : Wide_String; Pattern : Wide_String; From : Positive; Going : Direction := Forward; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural renames Ada.Strings.Wide_Search.Index; function Index (Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Membership := Inside; Going : Direction := Forward) return Natural renames Ada.Strings.Wide_Search.Index; function Index_Non_Blank (Source : Wide_String; Going : Direction := Forward) return Natural renames Ada.Strings.Wide_Search.Index_Non_Blank; function Index_Non_Blank (Source : Wide_String; From : Positive; Going : Direction := Forward) return Natural renames Ada.Strings.Wide_Search.Index_Non_Blank; function Count (Source : Wide_String; Pattern : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity) return Natural renames Ada.Strings.Wide_Search.Count; function Count (Source : Wide_String; Pattern : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Natural renames Ada.Strings.Wide_Search.Count; function Count (Source : Wide_String; Set : Wide_Maps.Wide_Character_Set) return Natural renames Ada.Strings.Wide_Search.Count; procedure Find_Token (Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; From : Positive; Test : Membership; First : out Positive; Last : out Natural) renames Ada.Strings.Wide_Search.Find_Token; procedure Find_Token (Source : Wide_String; Set : Wide_Maps.Wide_Character_Set; Test : Membership; First : out Positive; Last : out Natural) renames Ada.Strings.Wide_Search.Find_Token; --------- -- "*" -- --------- function "*" (Left : Natural; Right : Wide_Character) return Wide_String is Result : Wide_String (1 .. Left); begin for J in Result'Range loop Result (J) := Right; end loop; return Result; end "*"; function "*" (Left : Natural; Right : Wide_String) return Wide_String is Result : Wide_String (1 .. Left * Right'Length); Ptr : Integer := 1; begin for J in 1 .. Left loop Result (Ptr .. Ptr + Right'Length - 1) := Right; Ptr := Ptr + Right'Length; end loop; return Result; end "*"; ------------ -- Delete -- ------------ function Delete (Source : Wide_String; From : Positive; Through : Natural) return Wide_String is begin if From not in Source'Range or else Through > Source'Last then raise Index_Error; elsif From > Through then return Source; else declare Len : constant Integer := Source'Length - (Through - From + 1); Result : constant Wide_String (Source'First .. Source'First + Len - 1) := Source (Source'First .. From - 1) & Source (Through + 1 .. Source'Last); begin return Result; end; end if; end Delete; procedure Delete (Source : in out Wide_String; From : Positive; Through : Natural; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) is begin Move (Source => Delete (Source, From, Through), Target => Source, Justify => Justify, Pad => Pad); end Delete; ---------- -- Head -- ---------- function Head (Source : Wide_String; Count : Natural; Pad : Wide_Character := Wide_Space) return Wide_String is Result : Wide_String (1 .. Count); begin if Count <= Source'Length then Result := Source (Source'First .. Source'First + Count - 1); else Result (1 .. Source'Length) := Source; for J in Source'Length + 1 .. Count loop Result (J) := Pad; end loop; end if; return Result; end Head; procedure Head (Source : in out Wide_String; Count : Natural; Justify : Alignment := Left; Pad : Wide_Character := Ada.Strings.Wide_Space) is begin Move (Source => Head (Source, Count, Pad), Target => Source, Drop => Error, Justify => Justify, Pad => Pad); end Head; ------------ -- Insert -- ------------ function Insert (Source : Wide_String; Before : Positive; New_Item : Wide_String) return Wide_String is Result : Wide_String (1 .. Source'Length + New_Item'Length); begin if Before < Source'First or else Before > Source'Last + 1 then raise Index_Error; end if; Result := Source (Source'First .. Before - 1) & New_Item & Source (Before .. Source'Last); return Result; end Insert; procedure Insert (Source : in out Wide_String; Before : Positive; New_Item : Wide_String; Drop : Truncation := Error) is begin Move (Source => Insert (Source, Before, New_Item), Target => Source, Drop => Drop); end Insert; ---------- -- Move -- ---------- procedure Move (Source : Wide_String; Target : out Wide_String; Drop : Truncation := Error; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) is Sfirst : constant Integer := Source'First; Slast : constant Integer := Source'Last; Slength : constant Integer := Source'Length; Tfirst : constant Integer := Target'First; Tlast : constant Integer := Target'Last; Tlength : constant Integer := Target'Length; function Is_Padding (Item : Wide_String) return Boolean; -- Determine if all characters in Item are pad characters ---------------- -- Is_Padding -- ---------------- function Is_Padding (Item : Wide_String) return Boolean is begin for J in Item'Range loop if Item (J) /= Pad then return False; end if; end loop; return True; end Is_Padding; -- Start of processing for Move begin if Slength = Tlength then Target := Source; elsif Slength > Tlength then case Drop is when Left => Target := Source (Slast - Tlength + 1 .. Slast); when Right => Target := Source (Sfirst .. Sfirst + Tlength - 1); when Error => case Justify is when Left => if Is_Padding (Source (Sfirst + Tlength .. Slast)) then Target := Source (Sfirst .. Sfirst + Target'Length - 1); else raise Length_Error; end if; when Right => if Is_Padding (Source (Sfirst .. Slast - Tlength)) then Target := Source (Slast - Tlength + 1 .. Slast); else raise Length_Error; end if; when Center => raise Length_Error; end case; end case; -- Source'Length < Target'Length else case Justify is when Left => Target (Tfirst .. Tfirst + Slength - 1) := Source; for J in Tfirst + Slength .. Tlast loop Target (J) := Pad; end loop; when Right => for J in Tfirst .. Tlast - Slength loop Target (J) := Pad; end loop; Target (Tlast - Slength + 1 .. Tlast) := Source; when Center => declare Front_Pad : constant Integer := (Tlength - Slength) / 2; Tfirst_Fpad : constant Integer := Tfirst + Front_Pad; begin for J in Tfirst .. Tfirst_Fpad - 1 loop Target (J) := Pad; end loop; Target (Tfirst_Fpad .. Tfirst_Fpad + Slength - 1) := Source; for J in Tfirst_Fpad + Slength .. Tlast loop Target (J) := Pad; end loop; end; end case; end if; end Move; --------------- -- Overwrite -- --------------- function Overwrite (Source : Wide_String; Position : Positive; New_Item : Wide_String) return Wide_String is begin if Position not in Source'First .. Source'Last + 1 then raise Index_Error; else declare Result_Length : constant Natural := Natural'Max (Source'Length, Position - Source'First + New_Item'Length); Result : Wide_String (1 .. Result_Length); begin Result := Source (Source'First .. Position - 1) & New_Item & Source (Position + New_Item'Length .. Source'Last); return Result; end; end if; end Overwrite; procedure Overwrite (Source : in out Wide_String; Position : Positive; New_Item : Wide_String; Drop : Truncation := Right) is begin Move (Source => Overwrite (Source, Position, New_Item), Target => Source, Drop => Drop); end Overwrite; ------------------- -- Replace_Slice -- ------------------- function Replace_Slice (Source : Wide_String; Low : Positive; High : Natural; By : Wide_String) return Wide_String is begin if Low > Source'Last + 1 or else High < Source'First - 1 then raise Index_Error; end if; if High >= Low then declare Front_Len : constant Integer := Integer'Max (0, Low - Source'First); -- Length of prefix of Source copied to result Back_Len : constant Integer := Integer'Max (0, Source'Last - High); -- Length of suffix of Source copied to result Result_Length : constant Integer := Front_Len + By'Length + Back_Len; -- Length of result Result : Wide_String (1 .. Result_Length); begin Result (1 .. Front_Len) := Source (Source'First .. Low - 1); Result (Front_Len + 1 .. Front_Len + By'Length) := By; Result (Front_Len + By'Length + 1 .. Result'Length) := Source (High + 1 .. Source'Last); return Result; end; else return Insert (Source, Before => Low, New_Item => By); end if; end Replace_Slice; procedure Replace_Slice (Source : in out Wide_String; Low : Positive; High : Natural; By : Wide_String; Drop : Truncation := Error; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) is begin Move (Replace_Slice (Source, Low, High, By), Source, Drop, Justify, Pad); end Replace_Slice; ---------- -- Tail -- ---------- function Tail (Source : Wide_String; Count : Natural; Pad : Wide_Character := Wide_Space) return Wide_String is Result : Wide_String (1 .. Count); begin if Count < Source'Length then Result := Source (Source'Last - Count + 1 .. Source'Last); -- Pad on left else for J in 1 .. Count - Source'Length loop Result (J) := Pad; end loop; Result (Count - Source'Length + 1 .. Count) := Source; end if; return Result; end Tail; procedure Tail (Source : in out Wide_String; Count : Natural; Justify : Alignment := Left; Pad : Wide_Character := Ada.Strings.Wide_Space) is begin Move (Source => Tail (Source, Count, Pad), Target => Source, Drop => Error, Justify => Justify, Pad => Pad); end Tail; --------------- -- Translate -- --------------- function Translate (Source : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping) return Wide_String is Result : Wide_String (1 .. Source'Length); begin for J in Source'Range loop Result (J - (Source'First - 1)) := Value (Mapping, Source (J)); end loop; return Result; end Translate; procedure Translate (Source : in out Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping) is begin for J in Source'Range loop Source (J) := Value (Mapping, Source (J)); end loop; end Translate; function Translate (Source : Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) return Wide_String is Result : Wide_String (1 .. Source'Length); begin for J in Source'Range loop Result (J - (Source'First - 1)) := Mapping (Source (J)); end loop; return Result; end Translate; procedure Translate (Source : in out Wide_String; Mapping : Wide_Maps.Wide_Character_Mapping_Function) is begin for J in Source'Range loop Source (J) := Mapping (Source (J)); end loop; end Translate; ---------- -- Trim -- ---------- function Trim (Source : Wide_String; Side : Trim_End) return Wide_String is Low : Natural := Source'First; High : Natural := Source'Last; begin if Side = Left or else Side = Both then while Low <= High and then Source (Low) = Wide_Space loop Low := Low + 1; end loop; end if; if Side = Right or else Side = Both then while High >= Low and then Source (High) = Wide_Space loop High := High - 1; end loop; end if; -- All blanks case if Low > High then return ""; -- At least one non-blank else declare Result : constant Wide_String (1 .. High - Low + 1) := Source (Low .. High); begin return Result; end; end if; end Trim; procedure Trim (Source : in out Wide_String; Side : Trim_End; Justify : Alignment := Left; Pad : Wide_Character := Wide_Space) is begin Move (Source => Trim (Source, Side), Target => Source, Justify => Justify, Pad => Pad); end Trim; function Trim (Source : Wide_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set) return Wide_String is Low : Natural := Source'First; High : Natural := Source'Last; begin while Low <= High and then Is_In (Source (Low), Left) loop Low := Low + 1; end loop; while High >= Low and then Is_In (Source (High), Right) loop High := High - 1; end loop; -- Case where source comprises only characters in the sets if Low > High then return ""; else declare subtype WS is Wide_String (1 .. High - Low + 1); begin return WS (Source (Low .. High)); end; end if; end Trim; procedure Trim (Source : in out Wide_String; Left : Wide_Maps.Wide_Character_Set; Right : Wide_Maps.Wide_Character_Set; Justify : Alignment := Strings.Left; Pad : Wide_Character := Wide_Space) is begin Move (Source => Trim (Source, Left, Right), Target => Source, Justify => Justify, Pad => Pad); end Trim; end Ada.Strings.Wide_Fixed;
with RASCAL.OS; use RASCAL.OS; package Controller_Dummy is type TEL_Dummy is new Toolbox_UserEventListener(16#59#,-1,-1) with null record; -- -- This does nothing. -- procedure Handle (The : in TEL_Dummy); end Controller_Dummy;
-- Copyright (c) 2010 - 2018, Nordic Semiconductor ASA -- -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without modification, -- are permitted provided that the following conditions are met: -- -- 1. Redistributions of source code must retain the above copyright notice, this -- list of conditions and the following disclaimer. -- -- 2. Redistributions in binary form, except as embedded into a Nordic -- Semiconductor ASA integrated circuit in a product or a software update for -- such product, must reproduce the above copyright notice, this list of -- conditions and the following disclaimer in the documentation and/or other -- materials provided with the distribution. -- -- 3. Neither the name of Nordic Semiconductor ASA nor the names of its -- contributors may be used to endorse or promote products derived from this -- software without specific prior written permission. -- -- 4. This software, with or without modification, must only be used with a -- Nordic Semiconductor ASA integrated circuit. -- -- 5. Any software provided in binary form under this license must not be reverse -- engineered, decompiled, modified and/or disassembled. -- -- THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS -- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -- OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE -- DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE -- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -- GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -- OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- This spec has been automatically generated from nrf52.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package NRF_SVD.FICR is pragma Preelaborate; --------------- -- Registers -- --------------- -- Description collection[0]: Device identifier -- Description collection[0]: Device identifier type DEVICEID_Registers is array (0 .. 1) of HAL.UInt32; -- Description collection[0]: Encryption Root, word 0 -- Description collection[0]: Encryption Root, word 0 type ER_Registers is array (0 .. 3) of HAL.UInt32; -- Description collection[0]: Identity Root, word 0 -- Description collection[0]: Identity Root, word 0 type IR_Registers is array (0 .. 3) of HAL.UInt32; -- Device address type type DEVICEADDRTYPE_DEVICEADDRTYPE_Field is (-- Public address Public, -- Random address Random) with Size => 1; for DEVICEADDRTYPE_DEVICEADDRTYPE_Field use (Public => 0, Random => 1); -- Device address type type DEVICEADDRTYPE_Register is record -- Read-only. Device address type DEVICEADDRTYPE : DEVICEADDRTYPE_DEVICEADDRTYPE_Field; -- unspecified Reserved_1_31 : HAL.UInt31; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for DEVICEADDRTYPE_Register use record DEVICEADDRTYPE at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; -- Description collection[0]: Device address 0 -- Description collection[0]: Device address 0 type DEVICEADDR_Registers is array (0 .. 1) of HAL.UInt32; ------------------------------ -- INFO cluster's Registers -- ------------------------------ -- Description collection[0]: Unspecified -- Description collection[0]: Unspecified type UNUSED0_INFO_Registers is array (0 .. 2) of HAL.UInt32; -- Device info type INFO_Cluster is record -- Part code PART : aliased HAL.UInt32; -- Part Variant, Hardware version and Production configuration VARIANT : aliased HAL.UInt32; -- Package option PACKAGE_k : aliased HAL.UInt32; -- RAM variant RAM : aliased HAL.UInt32; -- Flash variant FLASH : aliased HAL.UInt32; -- Description collection[0]: Unspecified UNUSED0 : aliased UNUSED0_INFO_Registers; end record with Size => 256; for INFO_Cluster use record PART at 16#0# range 0 .. 31; VARIANT at 16#4# range 0 .. 31; PACKAGE_k at 16#8# range 0 .. 31; RAM at 16#C# range 0 .. 31; FLASH at 16#10# range 0 .. 31; UNUSED0 at 16#14# range 0 .. 95; end record; ------------------------------ -- TEMP cluster's Registers -- ------------------------------ subtype A_A_Field is HAL.UInt12; -- Slope definition A0. type A_Register is record -- Read-only. A (slope definition) register. A : A_A_Field; -- unspecified Reserved_12_31 : HAL.UInt20; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for A_Register use record A at 0 range 0 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; subtype B_B_Field is HAL.UInt14; -- y-intercept B0. type B_Register is record -- Read-only. B (y-intercept) B : B_B_Field; -- unspecified Reserved_14_31 : HAL.UInt18; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for B_Register use record B at 0 range 0 .. 13; Reserved_14_31 at 0 range 14 .. 31; end record; subtype T_T_Field is HAL.UInt8; -- Segment end T0. type T_Register is record -- Read-only. T (segment end)register. T : T_T_Field; -- unspecified Reserved_8_31 : HAL.UInt24; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for T_Register use record T at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Registers storing factory TEMP module linearization coefficients type TEMP_Cluster is record -- Slope definition A0. A0 : aliased A_Register; -- Slope definition A1. A1 : aliased A_Register; -- Slope definition A2. A2 : aliased A_Register; -- Slope definition A3. A3 : aliased A_Register; -- Slope definition A4. A4 : aliased A_Register; -- Slope definition A5. A5 : aliased A_Register; -- y-intercept B0. B0 : aliased B_Register; -- y-intercept B1. B1 : aliased B_Register; -- y-intercept B2. B2 : aliased B_Register; -- y-intercept B3. B3 : aliased B_Register; -- y-intercept B4. B4 : aliased B_Register; -- y-intercept B5. B5 : aliased B_Register; -- Segment end T0. T0 : aliased T_Register; -- Segment end T1. T1 : aliased T_Register; -- Segment end T2. T2 : aliased T_Register; -- Segment end T3. T3 : aliased T_Register; -- Segment end T4. T4 : aliased T_Register; end record with Size => 544; for TEMP_Cluster use record A0 at 16#0# range 0 .. 31; A1 at 16#4# range 0 .. 31; A2 at 16#8# range 0 .. 31; A3 at 16#C# range 0 .. 31; A4 at 16#10# range 0 .. 31; A5 at 16#14# range 0 .. 31; B0 at 16#18# range 0 .. 31; B1 at 16#1C# range 0 .. 31; B2 at 16#20# range 0 .. 31; B3 at 16#24# range 0 .. 31; B4 at 16#28# range 0 .. 31; B5 at 16#2C# range 0 .. 31; T0 at 16#30# range 0 .. 31; T1 at 16#34# range 0 .. 31; T2 at 16#38# range 0 .. 31; T3 at 16#3C# range 0 .. 31; T4 at 16#40# range 0 .. 31; end record; ----------------------------- -- NFC cluster's Registers -- ----------------------------- subtype TAGHEADER0_NFC_MFGID_Field is HAL.UInt8; -- TAGHEADER0_NFC_UD array element subtype TAGHEADER0_NFC_UD_Element is HAL.UInt8; -- TAGHEADER0_NFC_UD array type TAGHEADER0_NFC_UD_Field_Array is array (1 .. 3) of TAGHEADER0_NFC_UD_Element with Component_Size => 8, Size => 24; -- Type definition for TAGHEADER0_NFC_UD type TAGHEADER0_NFC_UD_Field (As_Array : Boolean := False) is record case As_Array is when False => -- UD as a value Val : HAL.UInt24; when True => -- UD as an array Arr : TAGHEADER0_NFC_UD_Field_Array; end case; end record with Unchecked_Union, Size => 24; for TAGHEADER0_NFC_UD_Field use record Val at 0 range 0 .. 23; Arr at 0 range 0 .. 23; end record; -- Default header for NFC Tag. Software can read these values to populate -- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. type TAGHEADER0_NFC_Register is record -- Read-only. Default Manufacturer ID: Nordic Semiconductor ASA has ICM -- 0x5F MFGID : TAGHEADER0_NFC_MFGID_Field; -- Read-only. Unique identifier byte 1 UD : TAGHEADER0_NFC_UD_Field; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TAGHEADER0_NFC_Register use record MFGID at 0 range 0 .. 7; UD at 0 range 8 .. 31; end record; -- TAGHEADER1_NFC_UD array element subtype TAGHEADER1_NFC_UD_Element is HAL.UInt8; -- TAGHEADER1_NFC_UD array type TAGHEADER1_NFC_UD_Field_Array is array (4 .. 7) of TAGHEADER1_NFC_UD_Element with Component_Size => 8, Size => 32; -- Default header for NFC Tag. Software can read these values to populate -- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. type TAGHEADER1_NFC_Register (As_Array : Boolean := False) is record case As_Array is when False => -- UD as a value Val : HAL.UInt32; when True => -- UD as an array Arr : TAGHEADER1_NFC_UD_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TAGHEADER1_NFC_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- TAGHEADER2_NFC_UD array element subtype TAGHEADER2_NFC_UD_Element is HAL.UInt8; -- TAGHEADER2_NFC_UD array type TAGHEADER2_NFC_UD_Field_Array is array (8 .. 11) of TAGHEADER2_NFC_UD_Element with Component_Size => 8, Size => 32; -- Default header for NFC Tag. Software can read these values to populate -- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. type TAGHEADER2_NFC_Register (As_Array : Boolean := False) is record case As_Array is when False => -- UD as a value Val : HAL.UInt32; when True => -- UD as an array Arr : TAGHEADER2_NFC_UD_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TAGHEADER2_NFC_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- TAGHEADER3_NFC_UD array element subtype TAGHEADER3_NFC_UD_Element is HAL.UInt8; -- TAGHEADER3_NFC_UD array type TAGHEADER3_NFC_UD_Field_Array is array (12 .. 15) of TAGHEADER3_NFC_UD_Element with Component_Size => 8, Size => 32; -- Default header for NFC Tag. Software can read these values to populate -- NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. type TAGHEADER3_NFC_Register (As_Array : Boolean := False) is record case As_Array is when False => -- UD as a value Val : HAL.UInt32; when True => -- UD as an array Arr : TAGHEADER3_NFC_UD_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for TAGHEADER3_NFC_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- Unspecified type NFC_Cluster is record -- Default header for NFC Tag. Software can read these values to -- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. TAGHEADER0 : aliased TAGHEADER0_NFC_Register; -- Default header for NFC Tag. Software can read these values to -- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. TAGHEADER1 : aliased TAGHEADER1_NFC_Register; -- Default header for NFC Tag. Software can read these values to -- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. TAGHEADER2 : aliased TAGHEADER2_NFC_Register; -- Default header for NFC Tag. Software can read these values to -- populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST. TAGHEADER3 : aliased TAGHEADER3_NFC_Register; end record with Size => 128; for NFC_Cluster use record TAGHEADER0 at 16#0# range 0 .. 31; TAGHEADER1 at 16#4# range 0 .. 31; TAGHEADER2 at 16#8# range 0 .. 31; TAGHEADER3 at 16#C# range 0 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Factory Information Configuration Registers type FICR_Peripheral is record -- Code memory page size CODEPAGESIZE : aliased HAL.UInt32; -- Code memory size CODESIZE : aliased HAL.UInt32; -- Description collection[0]: Device identifier DEVICEID : aliased DEVICEID_Registers; -- Description collection[0]: Encryption Root, word 0 ER : aliased ER_Registers; -- Description collection[0]: Identity Root, word 0 IR : aliased IR_Registers; -- Device address type DEVICEADDRTYPE : aliased DEVICEADDRTYPE_Register; -- Description collection[0]: Device address 0 DEVICEADDR : aliased DEVICEADDR_Registers; -- Device info INFO : aliased INFO_Cluster; -- Registers storing factory TEMP module linearization coefficients TEMP : aliased TEMP_Cluster; -- Unspecified NFC : aliased NFC_Cluster; end record with Volatile; for FICR_Peripheral use record CODEPAGESIZE at 16#10# range 0 .. 31; CODESIZE at 16#14# range 0 .. 31; DEVICEID at 16#60# range 0 .. 63; ER at 16#80# range 0 .. 127; IR at 16#90# range 0 .. 127; DEVICEADDRTYPE at 16#A0# range 0 .. 31; DEVICEADDR at 16#A4# range 0 .. 63; INFO at 16#100# range 0 .. 255; TEMP at 16#404# range 0 .. 543; NFC at 16#450# range 0 .. 127; end record; -- Factory Information Configuration Registers FICR_Periph : aliased FICR_Peripheral with Import, Address => FICR_Base; end NRF_SVD.FICR;
----------------------------------------------------------------------- -- awa-blogs-module -- Blog and post management module -- Copyright (C) 2011, 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Ada.Calendar; with ASF.Applications; with ADO; with Wiki.Strings; with AWA.Events; with AWA.Modules; with AWA.Blogs.Models; with AWA.Counters.Definition; with AWA.Blogs.Servlets; with Security.Permissions; -- == Integration == -- To be able to use the `Blogs` module, you will need to add the following line in your -- GNAT project file: -- -- with "awa_blogs"; -- -- The `Blog_Module` type manages the creation, update, removal of blog posts in an application. -- It provides operations that are used by the blog beans or other services to create and update -- posts. An instance of the `Blog_Module` must be declared and registered in the -- AWA application. The module instance can be defined as follows: -- -- with AWA.Blogs.Modules; -- ... -- type Application is new AWA.Applications.Application with record -- Blog_Module : aliased AWA.Blogs.Modules.Blog_Module; -- end record; -- -- And registered in the `Initialize_Modules` procedure by using: -- -- Register (App => App.Self.all'Access, -- Name => AWA.Blogs.Modules.NAME, -- URI => "blogs", -- Module => App.Blog_Module'Access); -- package AWA.Blogs.Modules is NAME : constant String := "blogs"; -- The configuration parameter that defines the image link prefix in rendered HTML content. PARAM_IMAGE_PREFIX : constant String := "image_prefix"; -- Define the permissions. package ACL_Create_Blog is new Security.Permissions.Definition ("blog-create"); package ACL_Delete_Blog is new Security.Permissions.Definition ("blog-delete"); package ACL_Create_Post is new Security.Permissions.Definition ("blog-create-post"); package ACL_Delete_Post is new Security.Permissions.Definition ("blog-delete-post"); package ACL_Update_Post is new Security.Permissions.Definition ("blog-update-post"); -- Definition the events. package Post_Publish_Event is new AWA.Events.Definition (Name => "blog-post-publish"); -- Define the read post counter. package Read_Counter is new AWA.Counters.Definition (Models.POST_TABLE, "read_count"); Not_Found : exception; type Blog_Module is new AWA.Modules.Module with private; type Blog_Module_Access is access all Blog_Module'Class; -- Initialize the blog module. overriding procedure Initialize (Plugin : in out Blog_Module; App : in AWA.Modules.Application_Access; Props : in ASF.Applications.Config); -- Configures the module after its initialization and after having read its XML configuration. overriding procedure Configure (Plugin : in out Blog_Module; Props : in ASF.Applications.Config); -- Get the blog module instance associated with the current application. function Get_Blog_Module return Blog_Module_Access; -- Get the image prefix that was configured for the Blog module. function Get_Image_Prefix (Module : in Blog_Module) return Wiki.Strings.UString; -- Create a new blog for the user workspace. procedure Create_Blog (Model : in Blog_Module; Title : in String; Result : out ADO.Identifier); -- Create a new post associated with the given blog identifier. procedure Create_Post (Model : in Blog_Module; Blog_Id : in ADO.Identifier; Title : in String; URI : in String; Text : in String; Summary : in String; Format : in AWA.Blogs.Models.Format_Type; Comment : in Boolean; Status : in AWA.Blogs.Models.Post_Status_Type; Result : out ADO.Identifier); -- Update the post title and text associated with the blog post identified by <b>Post</b>. procedure Update_Post (Model : in Blog_Module; Post_Id : in ADO.Identifier; Title : in String; Summary : in String; URI : in String; Text : in String; Format : in AWA.Blogs.Models.Format_Type; Comment : in Boolean; Publish_Date : in ADO.Nullable_Time; Status : in AWA.Blogs.Models.Post_Status_Type); -- Delete the post identified by the given identifier. procedure Delete_Post (Model : in Blog_Module; Post_Id : in ADO.Identifier); -- Load the image data associated with a blog post. The image must be public and the -- post visible for the image to be retrieved by anonymous users. procedure Load_Image (Model : in Blog_Module; Post_Id : in ADO.Identifier; Image_Id : in ADO.Identifier; Width : in out Natural; Height : in out Natural; Mime : out Ada.Strings.Unbounded.Unbounded_String; Date : out Ada.Calendar.Time; Into : out ADO.Blob_Ref); private type Blog_Module is new AWA.Modules.Module with record Image_Prefix : Wiki.Strings.UString; Image_Servlet : aliased AWA.Blogs.Servlets.Image_Servlet; end record; end AWA.Blogs.Modules;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Form_Demo -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 1998-2006,2011 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.16 $ -- $Date: 2011/03/23 00:44:12 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms; with Terminal_Interface.Curses.Forms.Field_User_Data; with Sample.My_Field_Type; use Sample.My_Field_Type; with Sample.Explanation; use Sample.Explanation; with Sample.Form_Demo.Aux; use Sample.Form_Demo.Aux; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Form_Demo.Handler; with Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada; with Terminal_Interface.Curses.Forms.Field_Types.Enumeration; use Terminal_Interface.Curses.Forms.Field_Types.Enumeration; with Terminal_Interface.Curses.Forms.Field_Types.IntField; use Terminal_Interface.Curses.Forms.Field_Types.IntField; package body Sample.Form_Demo is type User_Data is record Data : Integer; end record; type User_Access is access User_Data; package Fld_U is new Terminal_Interface.Curses.Forms.Field_User_Data (User_Data, User_Access); type Weekday is (Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday); package Weekday_Enum is new Terminal_Interface.Curses.Forms.Field_Types.Enumeration.Ada (Weekday); Enum_Field : constant Enumeration_Field := Weekday_Enum.Create; procedure Demo is Mft : constant My_Data := (Ch => 'X'); FA : Field_Array_Access := new Field_Array' (Make (0, 14, "Sample Entry Form"), Make (2, 0, "WeekdayEnumeration"), Make (2, 20, "Numeric 1-10"), Make (2, 34, "Only 'X'"), Make (5, 0, "Multiple Lines offscreen(Scroll)"), Make (Width => 18, Top => 3, Left => 0), Make (Width => 12, Top => 3, Left => 20), Make (Width => 12, Top => 3, Left => 34), Make (Width => 46, Top => 6, Left => 0, Height => 4, Off_Screen => 2), Null_Field ); Frm : Terminal_Interface.Curses.Forms.Form := Create (FA); I_F : constant Integer_Field := (Precision => 0, Lower_Limit => 1, Upper_Limit => 10); F1, F2 : User_Access; package Fh is new Sample.Form_Demo.Handler (Default_Driver); begin Push_Environment ("FORM00"); Notepad ("FORM-PAD00"); Default_Labels; Set_Field_Type (FA.all (6), Enum_Field); Set_Field_Type (FA.all (7), I_F); Set_Field_Type (FA.all (8), Mft); F1 := new User_Data'(Data => 4711); Fld_U.Set_User_Data (FA.all (1), F1); Fh.Drive_Me (Frm); Fld_U.Get_User_Data (FA.all (1), F2); pragma Assert (F1 = F2); pragma Assert (F1.Data = F2.Data); Pop_Environment; Delete (Frm); Free (FA, True); end Demo; end Sample.Form_Demo;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with AMF.Elements; with AMF.Internals.Element_Collections; with AMF.Internals.Helpers; with AMF.Internals.Tables.UML_Attributes; with AMF.Visitors.UML_Iterators; with AMF.Visitors.UML_Visitors; with League.Strings.Internals; with Matreshka.Internals.Strings; package body AMF.Internals.UML_Deployments is ------------------- -- Enter_Element -- ------------------- overriding procedure Enter_Element (Self : not null access constant UML_Deployment_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Enter_Deployment (AMF.UML.Deployments.UML_Deployment_Access (Self), Control); end if; end Enter_Element; ------------------- -- Leave_Element -- ------------------- overriding procedure Leave_Element (Self : not null access constant UML_Deployment_Proxy; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then AMF.Visitors.UML_Visitors.UML_Visitor'Class (Visitor).Leave_Deployment (AMF.UML.Deployments.UML_Deployment_Access (Self), Control); end if; end Leave_Element; ------------------- -- Visit_Element -- ------------------- overriding procedure Visit_Element (Self : not null access constant UML_Deployment_Proxy; Iterator : in out AMF.Visitors.Abstract_Iterator'Class; Visitor : in out AMF.Visitors.Abstract_Visitor'Class; Control : in out AMF.Visitors.Traverse_Control) is begin if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then AMF.Visitors.UML_Iterators.UML_Iterator'Class (Iterator).Visit_Deployment (Visitor, AMF.UML.Deployments.UML_Deployment_Access (Self), Control); end if; end Visit_Element; ----------------------- -- Get_Configuration -- ----------------------- overriding function Get_Configuration (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Deployment_Specifications.Collections.Set_Of_UML_Deployment_Specification is begin return AMF.UML.Deployment_Specifications.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Configuration (Self.Element))); end Get_Configuration; --------------------------- -- Get_Deployed_Artifact -- --------------------------- overriding function Get_Deployed_Artifact (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Deployed_Artifacts.Collections.Set_Of_UML_Deployed_Artifact is begin return AMF.UML.Deployed_Artifacts.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Deployed_Artifact (Self.Element))); end Get_Deployed_Artifact; ------------------ -- Get_Location -- ------------------ overriding function Get_Location (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Deployment_Targets.UML_Deployment_Target_Access is begin return AMF.UML.Deployment_Targets.UML_Deployment_Target_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Location (Self.Element))); end Get_Location; ------------------ -- Set_Location -- ------------------ overriding procedure Set_Location (Self : not null access UML_Deployment_Proxy; To : AMF.UML.Deployment_Targets.UML_Deployment_Target_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Location (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Location; ---------------- -- Get_Client -- ---------------- overriding function Get_Client (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client (Self.Element))); end Get_Client; ------------------ -- Get_Supplier -- ------------------ overriding function Get_Supplier (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Named_Elements.Collections.Set_Of_UML_Named_Element is begin return AMF.UML.Named_Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Supplier (Self.Element))); end Get_Supplier; ---------------- -- Get_Source -- ---------------- overriding function Get_Source (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Source (Self.Element))); end Get_Source; ---------------- -- Get_Target -- ---------------- overriding function Get_Target (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Target (Self.Element))); end Get_Target; ------------------------- -- Get_Related_Element -- ------------------------- overriding function Get_Related_Element (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Elements.Collections.Set_Of_UML_Element is begin return AMF.UML.Elements.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Related_Element (Self.Element))); end Get_Related_Element; --------------------------- -- Get_Client_Dependency -- --------------------------- overriding function Get_Client_Dependency (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is begin return AMF.UML.Dependencies.Collections.Wrap (AMF.Internals.Element_Collections.Wrap (AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency (Self.Element))); end Get_Client_Dependency; ------------------------- -- Get_Name_Expression -- ------------------------- overriding function Get_Name_Expression (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.String_Expressions.UML_String_Expression_Access is begin return AMF.UML.String_Expressions.UML_String_Expression_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression (Self.Element))); end Get_Name_Expression; ------------------------- -- Set_Name_Expression -- ------------------------- overriding procedure Set_Name_Expression (Self : not null access UML_Deployment_Proxy; To : AMF.UML.String_Expressions.UML_String_Expression_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Name_Expression; ------------------- -- Get_Namespace -- ------------------- overriding function Get_Namespace (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin return AMF.UML.Namespaces.UML_Namespace_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace (Self.Element))); end Get_Namespace; ------------------------ -- Get_Qualified_Name -- ------------------------ overriding function Get_Qualified_Name (Self : not null access constant UML_Deployment_Proxy) return AMF.Optional_String is begin declare use type Matreshka.Internals.Strings.Shared_String_Access; Aux : constant Matreshka.Internals.Strings.Shared_String_Access := AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element); begin if Aux = null then return (Is_Empty => True); else return (False, League.Strings.Internals.Create (Aux)); end if; end; end Get_Qualified_Name; ----------------------------------- -- Get_Owning_Template_Parameter -- ----------------------------------- overriding function Get_Owning_Template_Parameter (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter (Self.Element))); end Get_Owning_Template_Parameter; ----------------------------------- -- Set_Owning_Template_Parameter -- ----------------------------------- overriding procedure Set_Owning_Template_Parameter (Self : not null access UML_Deployment_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Owning_Template_Parameter; ---------------------------- -- Get_Template_Parameter -- ---------------------------- overriding function Get_Template_Parameter (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is begin return AMF.UML.Template_Parameters.UML_Template_Parameter_Access (AMF.Internals.Helpers.To_Element (AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter (Self.Element))); end Get_Template_Parameter; ---------------------------- -- Set_Template_Parameter -- ---------------------------- overriding procedure Set_Template_Parameter (Self : not null access UML_Deployment_Proxy; To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is begin AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter (Self.Element, AMF.Internals.Helpers.To_Element (AMF.Elements.Element_Access (To))); end Set_Template_Parameter; ------------------------- -- All_Owning_Packages -- ------------------------- overriding function All_Owning_Packages (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Packages.Collections.Set_Of_UML_Package is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented"); raise Program_Error with "Unimplemented procedure UML_Deployment_Proxy.All_Owning_Packages"; return All_Owning_Packages (Self); end All_Owning_Packages; ----------------------------- -- Is_Distinguishable_From -- ----------------------------- overriding function Is_Distinguishable_From (Self : not null access constant UML_Deployment_Proxy; N : AMF.UML.Named_Elements.UML_Named_Element_Access; Ns : AMF.UML.Namespaces.UML_Namespace_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented"); raise Program_Error with "Unimplemented procedure UML_Deployment_Proxy.Is_Distinguishable_From"; return Is_Distinguishable_From (Self, N, Ns); end Is_Distinguishable_From; --------------- -- Namespace -- --------------- overriding function Namespace (Self : not null access constant UML_Deployment_Proxy) return AMF.UML.Namespaces.UML_Namespace_Access is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented"); raise Program_Error with "Unimplemented procedure UML_Deployment_Proxy.Namespace"; return Namespace (Self); end Namespace; ------------------------ -- Is_Compatible_With -- ------------------------ overriding function Is_Compatible_With (Self : not null access constant UML_Deployment_Proxy; P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented"); raise Program_Error with "Unimplemented procedure UML_Deployment_Proxy.Is_Compatible_With"; return Is_Compatible_With (Self, P); end Is_Compatible_With; --------------------------- -- Is_Template_Parameter -- --------------------------- overriding function Is_Template_Parameter (Self : not null access constant UML_Deployment_Proxy) return Boolean is begin -- Generated stub: replace with real body! pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented"); raise Program_Error with "Unimplemented procedure UML_Deployment_Proxy.Is_Template_Parameter"; return Is_Template_Parameter (Self); end Is_Template_Parameter; end AMF.Internals.UML_Deployments;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . C H A R A C T E R S . L A T I N _ 9 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2021, Free Software Foundation, Inc. -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. The copyright notice above, and the license provisions that follow -- -- apply solely to the modifications made to Ada.Characters.Latin_1, noted -- -- in the text, to derive the equivalent Latin-9 package. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides definitions for Latin-9 (ISO-8859-15) analogous to -- those defined in the standard package Ada.Characters.Latin_1 for Latin-1. package Ada.Characters.Latin_9 is pragma Pure; ------------------------ -- Control Characters -- ------------------------ NUL : constant Character := Character'Val (0); SOH : constant Character := Character'Val (1); STX : constant Character := Character'Val (2); ETX : constant Character := Character'Val (3); EOT : constant Character := Character'Val (4); ENQ : constant Character := Character'Val (5); ACK : constant Character := Character'Val (6); BEL : constant Character := Character'Val (7); BS : constant Character := Character'Val (8); HT : constant Character := Character'Val (9); LF : constant Character := Character'Val (10); VT : constant Character := Character'Val (11); FF : constant Character := Character'Val (12); CR : constant Character := Character'Val (13); SO : constant Character := Character'Val (14); SI : constant Character := Character'Val (15); DLE : constant Character := Character'Val (16); DC1 : constant Character := Character'Val (17); DC2 : constant Character := Character'Val (18); DC3 : constant Character := Character'Val (19); DC4 : constant Character := Character'Val (20); NAK : constant Character := Character'Val (21); SYN : constant Character := Character'Val (22); ETB : constant Character := Character'Val (23); CAN : constant Character := Character'Val (24); EM : constant Character := Character'Val (25); SUB : constant Character := Character'Val (26); ESC : constant Character := Character'Val (27); FS : constant Character := Character'Val (28); GS : constant Character := Character'Val (29); RS : constant Character := Character'Val (30); US : constant Character := Character'Val (31); -------------------------------- -- ISO 646 Graphic Characters -- -------------------------------- Space : constant Character := ' '; -- Character'Val(32) Exclamation : constant Character := '!'; -- Character'Val(33) Quotation : constant Character := '"'; -- Character'Val(34) Number_Sign : constant Character := '#'; -- Character'Val(35) Dollar_Sign : constant Character := '$'; -- Character'Val(36) Percent_Sign : constant Character := '%'; -- Character'Val(37) Ampersand : constant Character := '&'; -- Character'Val(38) Apostrophe : constant Character := '''; -- Character'Val(39) Left_Parenthesis : constant Character := '('; -- Character'Val(40) Right_Parenthesis : constant Character := ')'; -- Character'Val(41) Asterisk : constant Character := '*'; -- Character'Val(42) Plus_Sign : constant Character := '+'; -- Character'Val(43) Comma : constant Character := ','; -- Character'Val(44) Hyphen : constant Character := '-'; -- Character'Val(45) Minus_Sign : Character renames Hyphen; Full_Stop : constant Character := '.'; -- Character'Val(46) Solidus : constant Character := '/'; -- Character'Val(47) -- Decimal digits '0' though '9' are at positions 48 through 57 Colon : constant Character := ':'; -- Character'Val(58) Semicolon : constant Character := ';'; -- Character'Val(59) Less_Than_Sign : constant Character := '<'; -- Character'Val(60) Equals_Sign : constant Character := '='; -- Character'Val(61) Greater_Than_Sign : constant Character := '>'; -- Character'Val(62) Question : constant Character := '?'; -- Character'Val(63) Commercial_At : constant Character := '@'; -- Character'Val(64) -- Letters 'A' through 'Z' are at positions 65 through 90 Left_Square_Bracket : constant Character := '['; -- Character'Val (91) Reverse_Solidus : constant Character := '\'; -- Character'Val (92) Right_Square_Bracket : constant Character := ']'; -- Character'Val (93) Circumflex : constant Character := '^'; -- Character'Val (94) Low_Line : constant Character := '_'; -- Character'Val (95) Grave : constant Character := '`'; -- Character'Val (96) LC_A : constant Character := 'a'; -- Character'Val (97) LC_B : constant Character := 'b'; -- Character'Val (98) LC_C : constant Character := 'c'; -- Character'Val (99) LC_D : constant Character := 'd'; -- Character'Val (100) LC_E : constant Character := 'e'; -- Character'Val (101) LC_F : constant Character := 'f'; -- Character'Val (102) LC_G : constant Character := 'g'; -- Character'Val (103) LC_H : constant Character := 'h'; -- Character'Val (104) LC_I : constant Character := 'i'; -- Character'Val (105) LC_J : constant Character := 'j'; -- Character'Val (106) LC_K : constant Character := 'k'; -- Character'Val (107) LC_L : constant Character := 'l'; -- Character'Val (108) LC_M : constant Character := 'm'; -- Character'Val (109) LC_N : constant Character := 'n'; -- Character'Val (110) LC_O : constant Character := 'o'; -- Character'Val (111) LC_P : constant Character := 'p'; -- Character'Val (112) LC_Q : constant Character := 'q'; -- Character'Val (113) LC_R : constant Character := 'r'; -- Character'Val (114) LC_S : constant Character := 's'; -- Character'Val (115) LC_T : constant Character := 't'; -- Character'Val (116) LC_U : constant Character := 'u'; -- Character'Val (117) LC_V : constant Character := 'v'; -- Character'Val (118) LC_W : constant Character := 'w'; -- Character'Val (119) LC_X : constant Character := 'x'; -- Character'Val (120) LC_Y : constant Character := 'y'; -- Character'Val (121) LC_Z : constant Character := 'z'; -- Character'Val (122) Left_Curly_Bracket : constant Character := '{'; -- Character'Val (123) Vertical_Line : constant Character := '|'; -- Character'Val (124) Right_Curly_Bracket : constant Character := '}'; -- Character'Val (125) Tilde : constant Character := '~'; -- Character'Val (126) DEL : constant Character := Character'Val (127); --------------------------------- -- ISO 6429 Control Characters -- --------------------------------- IS4 : Character renames FS; IS3 : Character renames GS; IS2 : Character renames RS; IS1 : Character renames US; Reserved_128 : constant Character := Character'Val (128); Reserved_129 : constant Character := Character'Val (129); BPH : constant Character := Character'Val (130); NBH : constant Character := Character'Val (131); Reserved_132 : constant Character := Character'Val (132); NEL : constant Character := Character'Val (133); SSA : constant Character := Character'Val (134); ESA : constant Character := Character'Val (135); HTS : constant Character := Character'Val (136); HTJ : constant Character := Character'Val (137); VTS : constant Character := Character'Val (138); PLD : constant Character := Character'Val (139); PLU : constant Character := Character'Val (140); RI : constant Character := Character'Val (141); SS2 : constant Character := Character'Val (142); SS3 : constant Character := Character'Val (143); DCS : constant Character := Character'Val (144); PU1 : constant Character := Character'Val (145); PU2 : constant Character := Character'Val (146); STS : constant Character := Character'Val (147); CCH : constant Character := Character'Val (148); MW : constant Character := Character'Val (149); SPA : constant Character := Character'Val (150); EPA : constant Character := Character'Val (151); SOS : constant Character := Character'Val (152); Reserved_153 : constant Character := Character'Val (153); SCI : constant Character := Character'Val (154); CSI : constant Character := Character'Val (155); ST : constant Character := Character'Val (156); OSC : constant Character := Character'Val (157); PM : constant Character := Character'Val (158); APC : constant Character := Character'Val (159); ------------------------------ -- Other Graphic Characters -- ------------------------------ -- Character positions 160 (16#A0#) .. 175 (16#AF#) No_Break_Space : constant Character := Character'Val (160); NBSP : Character renames No_Break_Space; Inverted_Exclamation : constant Character := Character'Val (161); Cent_Sign : constant Character := Character'Val (162); Pound_Sign : constant Character := Character'Val (163); Euro_Sign : constant Character := Character'Val (164); Yen_Sign : constant Character := Character'Val (165); UC_S_Caron : constant Character := Character'Val (166); Section_Sign : constant Character := Character'Val (167); LC_S_Caron : constant Character := Character'Val (168); Copyright_Sign : constant Character := Character'Val (169); Feminine_Ordinal_Indicator : constant Character := Character'Val (170); Left_Angle_Quotation : constant Character := Character'Val (171); Not_Sign : constant Character := Character'Val (172); Soft_Hyphen : constant Character := Character'Val (173); Registered_Trade_Mark_Sign : constant Character := Character'Val (174); Macron : constant Character := Character'Val (175); -- Character positions 176 (16#B0#) .. 191 (16#BF#) Degree_Sign : constant Character := Character'Val (176); Ring_Above : Character renames Degree_Sign; Plus_Minus_Sign : constant Character := Character'Val (177); Superscript_Two : constant Character := Character'Val (178); Superscript_Three : constant Character := Character'Val (179); UC_Z_Caron : constant Character := Character'Val (180); Micro_Sign : constant Character := Character'Val (181); Pilcrow_Sign : constant Character := Character'Val (182); Paragraph_Sign : Character renames Pilcrow_Sign; Middle_Dot : constant Character := Character'Val (183); LC_Z_Caron : constant Character := Character'Val (184); Superscript_One : constant Character := Character'Val (185); Masculine_Ordinal_Indicator : constant Character := Character'Val (186); Right_Angle_Quotation : constant Character := Character'Val (187); UC_Ligature_OE : constant Character := Character'Val (188); LC_Ligature_OE : constant Character := Character'Val (189); UC_Y_Diaeresis : constant Character := Character'Val (190); Inverted_Question : constant Character := Character'Val (191); -- Character positions 192 (16#C0#) .. 207 (16#CF#) UC_A_Grave : constant Character := Character'Val (192); UC_A_Acute : constant Character := Character'Val (193); UC_A_Circumflex : constant Character := Character'Val (194); UC_A_Tilde : constant Character := Character'Val (195); UC_A_Diaeresis : constant Character := Character'Val (196); UC_A_Ring : constant Character := Character'Val (197); UC_AE_Diphthong : constant Character := Character'Val (198); UC_C_Cedilla : constant Character := Character'Val (199); UC_E_Grave : constant Character := Character'Val (200); UC_E_Acute : constant Character := Character'Val (201); UC_E_Circumflex : constant Character := Character'Val (202); UC_E_Diaeresis : constant Character := Character'Val (203); UC_I_Grave : constant Character := Character'Val (204); UC_I_Acute : constant Character := Character'Val (205); UC_I_Circumflex : constant Character := Character'Val (206); UC_I_Diaeresis : constant Character := Character'Val (207); -- Character positions 208 (16#D0#) .. 223 (16#DF#) UC_Icelandic_Eth : constant Character := Character'Val (208); UC_N_Tilde : constant Character := Character'Val (209); UC_O_Grave : constant Character := Character'Val (210); UC_O_Acute : constant Character := Character'Val (211); UC_O_Circumflex : constant Character := Character'Val (212); UC_O_Tilde : constant Character := Character'Val (213); UC_O_Diaeresis : constant Character := Character'Val (214); Multiplication_Sign : constant Character := Character'Val (215); UC_O_Oblique_Stroke : constant Character := Character'Val (216); UC_U_Grave : constant Character := Character'Val (217); UC_U_Acute : constant Character := Character'Val (218); UC_U_Circumflex : constant Character := Character'Val (219); UC_U_Diaeresis : constant Character := Character'Val (220); UC_Y_Acute : constant Character := Character'Val (221); UC_Icelandic_Thorn : constant Character := Character'Val (222); LC_German_Sharp_S : constant Character := Character'Val (223); -- Character positions 224 (16#E0#) .. 239 (16#EF#) LC_A_Grave : constant Character := Character'Val (224); LC_A_Acute : constant Character := Character'Val (225); LC_A_Circumflex : constant Character := Character'Val (226); LC_A_Tilde : constant Character := Character'Val (227); LC_A_Diaeresis : constant Character := Character'Val (228); LC_A_Ring : constant Character := Character'Val (229); LC_AE_Diphthong : constant Character := Character'Val (230); LC_C_Cedilla : constant Character := Character'Val (231); LC_E_Grave : constant Character := Character'Val (232); LC_E_Acute : constant Character := Character'Val (233); LC_E_Circumflex : constant Character := Character'Val (234); LC_E_Diaeresis : constant Character := Character'Val (235); LC_I_Grave : constant Character := Character'Val (236); LC_I_Acute : constant Character := Character'Val (237); LC_I_Circumflex : constant Character := Character'Val (238); LC_I_Diaeresis : constant Character := Character'Val (239); -- Character positions 240 (16#F0#) .. 255 (16#FF) LC_Icelandic_Eth : constant Character := Character'Val (240); LC_N_Tilde : constant Character := Character'Val (241); LC_O_Grave : constant Character := Character'Val (242); LC_O_Acute : constant Character := Character'Val (243); LC_O_Circumflex : constant Character := Character'Val (244); LC_O_Tilde : constant Character := Character'Val (245); LC_O_Diaeresis : constant Character := Character'Val (246); Division_Sign : constant Character := Character'Val (247); LC_O_Oblique_Stroke : constant Character := Character'Val (248); LC_U_Grave : constant Character := Character'Val (249); LC_U_Acute : constant Character := Character'Val (250); LC_U_Circumflex : constant Character := Character'Val (251); LC_U_Diaeresis : constant Character := Character'Val (252); LC_Y_Acute : constant Character := Character'Val (253); LC_Icelandic_Thorn : constant Character := Character'Val (254); LC_Y_Diaeresis : constant Character := Character'Val (255); ------------------------------------------------ -- Summary of Changes from Latin-1 => Latin-9 -- ------------------------------------------------ -- 164 Currency => Euro_Sign -- 166 Broken_Bar => UC_S_Caron -- 168 Diaeresis => LC_S_Caron -- 180 Acute => UC_Z_Caron -- 184 Cedilla => LC_Z_Caron -- 188 Fraction_One_Quarter => UC_Ligature_OE -- 189 Fraction_One_Half => LC_Ligature_OE -- 190 Fraction_Three_Quarters => UC_Y_Diaeresis end Ada.Characters.Latin_9;
-- This package is intended to set up and tear down the test environment. -- Once created by GNATtest, this package will never be overwritten -- automatically. Contents of this package can be modified in any way -- except for sections surrounded by a 'read only' marker. with Interfaces.C.Pointers.Test_Data; with Interfaces.C.Pointers.Test_Data.Tests; package Tcl.Commands.Test_Data.Tests.Argv_Pointer.Test_Data is -- begin read only type Test is new AUnit.Test_Fixtures.Test_Fixture -- end read only with null record; procedure Set_Up(Gnattest_T: in out Test); procedure Tear_Down(Gnattest_T: in out Test); -- begin read only package Gnattest_Data_Inst is new GNATtest_Generated.GNATtest_Standard.Tcl .Commands .Argv_Pointer .Test_Data (Test); package Gnattest_Tests_Inst is new Gnattest_Data_Inst.Tests; type New_Test is new Gnattest_Tests_Inst.Test with null record; -- end read only procedure User_Set_Up(Gnattest_T: in out New_Test); procedure User_Tear_Down(Gnattest_T: in out New_Test); end Tcl.Commands.Test_Data.Tests.Argv_Pointer.Test_Data;
package body TREE_STATIC_Def is procedure check (i : int; v : integer) is begin if i.value /= v then raise program_error; end if; end; end;
with Ada.Unchecked_Conversion; with System.Address_To_Named_Access_Conversions; with System.Soft_Links; with System.Synchronous_Control; with System.Termination; package body System.Tasking.Stages is package Task_Id_Conv is new Address_To_Named_Access_Conversions ( Tasks.Task_Record, Tasks.Task_Id); procedure Unregister; procedure Unregister is begin Soft_Links.Current_Master := Soft_Links.Zero'Access; Soft_Links.Enter_Master := Soft_Links.Nop'Access; Soft_Links.Complete_Master := Soft_Links.Nop'Access; end Unregister; function Current_Master return Master_Level renames Tasks.Master_Within; procedure Enter_Master renames Tasks.Enter_Master; procedure Complete_Master renames Tasks.Leave_Master; procedure Unlock_Abort renames Tasks.Unlock_Abort; procedure Lock_Abort renames Tasks.Lock_Abort; function Storage_Size (T : Task_Id) return Storage_Elements.Storage_Count; function Storage_Size (T : Task_Id) return Storage_Elements.Storage_Count is Id : constant Tasks.Task_Id := Task_Id_Conv.To_Pointer (T); Addr : Address; Size : Storage_Elements.Storage_Count; begin if not Tasks.Activated (Id) then -- accessed before elaboration, C92005A Size := 0; else Tasks.Get_Stack (Id, Addr, Size); end if; return Size; end Storage_Size; -- implementation procedure Create_Task ( Priority : Integer; Size : Parameters.Size_Type; Secondary_Stack_Size : Parameters.Size_Type; Task_Info : System.Task_Info.Task_Info_Type; CPU : Integer; Relative_Deadline : Ada.Real_Time.Time_Span; Domain : Dispatching_Domain_Access; Num_Entries : Task_Entry_Index; Master : Master_Level; State : Task_Procedure_Access; Discriminants : Address; Elaborated : not null Tasks.Boolean_Access; Chain : in out Activation_Chain; Task_Image : String; Created_Task : out Task_Id) is pragma Unreferenced (Priority); pragma Unreferenced (Size); pragma Unreferenced (Secondary_Stack_Size); pragma Unreferenced (Task_Info); pragma Unreferenced (CPU); pragma Unreferenced (Relative_Deadline); pragma Unreferenced (Domain); function To_Tasks_AC is new Ada.Unchecked_Conversion ( Activation_Chain_Access, Tasks.Activation_Chain_Access); Master_Of_Parent : constant Tasks.Master_Access := Tasks.Master_Of_Parent (Master); New_Task_Id : Tasks.Task_Id; begin Tasks.Create ( New_Task_Id, Discriminants, State, Name => Task_Image, Chain => To_Tasks_AC (Chain'Unrestricted_Access), Elaborated => Elaborated, Master => Master_Of_Parent, Entry_Last_Index => Num_Entries); Created_Task := Task_Id_Conv.To_Address (New_Task_Id); end Create_Task; procedure Complete_Activation is Aborted : Boolean; -- abort or elaboration error begin Tasks.Accept_Activation (Aborted); if Aborted then Tasks.Raise_Abort_Signal; end if; end Complete_Activation; procedure Complete_Task is begin Tasks.Cancel_Calls; -- compiler omits final one calling Complete_Master, so do it here -- do it before returning task body, since descriptors and discriminants -- of child tasks are placed on the stack of task body -- do it before set 'Terminated to False required by C94001A Tasks.Leave_All_Masters; end Complete_Task; procedure Activate_Tasks ( Chain_Access : not null access Activation_Chain) is function To_Tasks_AC is new Ada.Unchecked_Conversion ( Activation_Chain_Access, Tasks.Activation_Chain_Access); Aborted : Boolean; -- ignore abort pragma Unreferenced (Aborted); begin Tasks.Activate (To_Tasks_AC (Chain_Access), Aborted => Aborted); end Activate_Tasks; procedure Free_Task (T : Task_Id) is Id : Tasks.Task_Id := Task_Id_Conv.To_Pointer (T); begin case Tasks.Preferred_Free_Mode (Id) is when Tasks.Wait => declare Aborted : Boolean; -- ignored begin Tasks.Wait (Id, Aborted => Aborted); end; when Tasks.Detach => Tasks.Detach (Id); end case; end Free_Task; procedure Move_Activation_Chain ( From, To : Activation_Chain_Access; New_Master : Master_ID) is function To_Tasks_AC is new Ada.Unchecked_Conversion ( Activation_Chain_Access, Tasks.Activation_Chain_Access); New_Master_Of_Parent : constant Tasks.Master_Access := Tasks.Master_Of_Parent (New_Master); begin Tasks.Move (To_Tasks_AC (From), To_Tasks_AC (To), New_Master_Of_Parent); end Move_Activation_Chain; procedure Abort_Tasks (Tasks : Task_List) is begin for I in Tasks'Range loop System.Tasks.Send_Abort (Task_Id_Conv.To_Pointer (Tasks (I))); end loop; end Abort_Tasks; function Terminated (T : Task_Id) return Boolean is begin return Tasks.Terminated (Task_Id_Conv.To_Pointer (T)); end Terminated; begin Soft_Links.Current_Master := Current_Master'Access; Soft_Links.Enter_Master := Enter_Master'Access; Soft_Links.Complete_Master := Complete_Master'Access; Synchronous_Control.Unlock_Abort_Hook := Unlock_Abort'Access; Synchronous_Control.Lock_Abort_Hook := Lock_Abort'Access; Tasking.Storage_Size := Storage_Size'Access; Termination.Register_Exit (Unregister'Access); end System.Tasking.Stages;
-- This spec has been automatically generated from STM32F072x.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.COMP is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CSR_COMP1EN_Field is STM32_SVD.Bit; subtype CSR_COMP1_INP_DAC_Field is STM32_SVD.Bit; subtype CSR_COMP1MODE_Field is STM32_SVD.UInt2; subtype CSR_COMP1INSEL_Field is STM32_SVD.UInt3; subtype CSR_COMP1OUTSEL_Field is STM32_SVD.UInt3; subtype CSR_COMP1POL_Field is STM32_SVD.Bit; subtype CSR_COMP1HYST_Field is STM32_SVD.UInt2; subtype CSR_COMP1OUT_Field is STM32_SVD.Bit; subtype CSR_COMP1LOCK_Field is STM32_SVD.Bit; subtype CSR_COMP2EN_Field is STM32_SVD.Bit; subtype CSR_COMP2MODE_Field is STM32_SVD.UInt2; subtype CSR_COMP2INSEL_Field is STM32_SVD.UInt3; subtype CSR_WNDWEN_Field is STM32_SVD.Bit; subtype CSR_COMP2OUTSEL_Field is STM32_SVD.UInt3; subtype CSR_COMP2POL_Field is STM32_SVD.Bit; subtype CSR_COMP2HYST_Field is STM32_SVD.UInt2; subtype CSR_COMP2OUT_Field is STM32_SVD.Bit; subtype CSR_COMP2LOCK_Field is STM32_SVD.Bit; -- control and status register type CSR_Register is record -- Comparator 1 enable COMP1EN : CSR_COMP1EN_Field := 16#0#; -- COMP1_INP_DAC COMP1_INP_DAC : CSR_COMP1_INP_DAC_Field := 16#0#; -- Comparator 1 mode COMP1MODE : CSR_COMP1MODE_Field := 16#0#; -- Comparator 1 inverting input selection COMP1INSEL : CSR_COMP1INSEL_Field := 16#0#; -- unspecified Reserved_7_7 : STM32_SVD.Bit := 16#0#; -- Comparator 1 output selection COMP1OUTSEL : CSR_COMP1OUTSEL_Field := 16#0#; -- Comparator 1 output polarity COMP1POL : CSR_COMP1POL_Field := 16#0#; -- Comparator 1 hysteresis COMP1HYST : CSR_COMP1HYST_Field := 16#0#; -- Read-only. Comparator 1 output COMP1OUT : CSR_COMP1OUT_Field := 16#0#; -- Comparator 1 lock COMP1LOCK : CSR_COMP1LOCK_Field := 16#0#; -- Comparator 2 enable COMP2EN : CSR_COMP2EN_Field := 16#0#; -- unspecified Reserved_17_17 : STM32_SVD.Bit := 16#0#; -- Comparator 2 mode COMP2MODE : CSR_COMP2MODE_Field := 16#0#; -- Comparator 2 inverting input selection COMP2INSEL : CSR_COMP2INSEL_Field := 16#0#; -- Window mode enable WNDWEN : CSR_WNDWEN_Field := 16#0#; -- Comparator 2 output selection COMP2OUTSEL : CSR_COMP2OUTSEL_Field := 16#0#; -- Comparator 2 output polarity COMP2POL : CSR_COMP2POL_Field := 16#0#; -- Comparator 2 hysteresis COMP2HYST : CSR_COMP2HYST_Field := 16#0#; -- Read-only. Comparator 2 output COMP2OUT : CSR_COMP2OUT_Field := 16#0#; -- Comparator 2 lock COMP2LOCK : CSR_COMP2LOCK_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CSR_Register use record COMP1EN at 0 range 0 .. 0; COMP1_INP_DAC at 0 range 1 .. 1; COMP1MODE at 0 range 2 .. 3; COMP1INSEL at 0 range 4 .. 6; Reserved_7_7 at 0 range 7 .. 7; COMP1OUTSEL at 0 range 8 .. 10; COMP1POL at 0 range 11 .. 11; COMP1HYST at 0 range 12 .. 13; COMP1OUT at 0 range 14 .. 14; COMP1LOCK at 0 range 15 .. 15; COMP2EN at 0 range 16 .. 16; Reserved_17_17 at 0 range 17 .. 17; COMP2MODE at 0 range 18 .. 19; COMP2INSEL at 0 range 20 .. 22; WNDWEN at 0 range 23 .. 23; COMP2OUTSEL at 0 range 24 .. 26; COMP2POL at 0 range 27 .. 27; COMP2HYST at 0 range 28 .. 29; COMP2OUT at 0 range 30 .. 30; COMP2LOCK at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Comparator type COMP_Peripheral is record -- control and status register CSR : aliased CSR_Register; end record with Volatile; for COMP_Peripheral use record CSR at 0 range 0 .. 31; end record; -- Comparator COMP_Periph : aliased COMP_Peripheral with Import, Address => System'To_Address (16#4001001C#); end STM32_SVD.COMP;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- G N A T . S E C U R E _ H A S H E S . S H A 1 -- -- -- -- S p e c -- -- -- -- Copyright (C) 2002-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides supporting code for implementation of the SHA-1 -- secure hash function as described in FIPS PUB 180-3. The complete text -- of FIPS PUB 180-3 can be found at: -- http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf -- This is an internal unit and should not be used directly in applications. -- Use GNAT.SHA1 instead. with GNAT.Byte_Swapping; with Interfaces; package GNAT.Secure_Hashes.SHA1 is package Hash_State is new Hash_Function_State (Word => Interfaces.Unsigned_32, Swap => GNAT.Byte_Swapping.Swap4, Hash_Bit_Order => System.High_Order_First); -- SHA-1 operates on 32-bit big endian words Block_Words : constant := 16; -- Messages are processed in chunks of 16 words procedure Transform (H : in out Hash_State.State; M : in out Message_State); -- Transformation function applied for each block Initial_State : constant Hash_State.State; -- Initialization vector private Initial_State : constant Hash_State.State := (0 => 16#67452301#, 1 => 16#EFCDAB89#, 2 => 16#98BADCFE#, 3 => 16#10325476#, 4 => 16#C3D2E1F0#); -- Initialization vector from FIPS PUB 180-3 end GNAT.Secure_Hashes.SHA1;
----------------------------------------------------------------------- -- mapping -- Example of serialization mappings -- Copyright (C) 2010, 2011, 2012, 2014 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Log.Loggers; package body Mapping is use Util.Beans.Objects; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Mapping"); type Property_Fields is (FIELD_NAME, FIELD_VALUE); type Property_Access is access all Property; type Address_Fields is (FIELD_CITY, FIELD_STREET, FIELD_COUNTRY, FIELD_ZIP); type Address_Access is access all Address; procedure Proxy_Address (Attr : in Util.Serialize.Mappers.Mapping'Class; Element : in out Person; Value : in Util.Beans.Objects.Object); function Get_Address_Member (Addr : in Address; Field : in Address_Fields) return Util.Beans.Objects.Object; procedure Set_Member (Addr : in out Address; Field : in Address_Fields; Value : in Util.Beans.Objects.Object); procedure Set_Member (P : in out Property; Field : in Property_Fields; Value : in Util.Beans.Objects.Object); procedure Set_Member (P : in out Property; Field : in Property_Fields; Value : in Util.Beans.Objects.Object) is begin case Field is when FIELD_NAME => P.Name := To_Unbounded_String (Value); when FIELD_VALUE => P.Value := To_Unbounded_String (Value); end case; end Set_Member; package Property_Mapper is new Util.Serialize.Mappers.Record_Mapper (Element_Type => Property, Element_Type_Access => Property_Access, Fields => Property_Fields, Set_Member => Set_Member); -- ------------------------------ -- Set the name/value pair on the current object. -- ------------------------------ procedure Set_Member (P : in out Person; Field : in Person_Fields; Value : in Util.Beans.Objects.Object) is begin Log.Debug ("Person field {0} - {0}", Person_Fields'Image (Field), To_String (Value)); case Field is when FIELD_FIRST_NAME => P.First_Name := To_Unbounded_String (Value); when FIELD_LAST_NAME => P.Last_Name := To_Unbounded_String (Value); when FIELD_AGE => P.Age := To_Integer (Value); when FIELD_ID => P.Id := To_Long_Long_Integer (Value); when FIELD_NAME => P.Name := To_Unbounded_String (Value); when FIELD_USER_NAME => P.Username := To_Unbounded_String (Value); when FIELD_GENDER => P.Gender := To_Unbounded_String (Value); when FIELD_LINK => P.Link := To_Unbounded_String (Value); end case; end Set_Member; -- ------------------------------ -- Set the name/value pair on the current object. -- ------------------------------ function Get_Person_Member (From : in Person; Field : in Person_Fields) return Util.Beans.Objects.Object is begin case Field is when FIELD_FIRST_NAME => return Util.Beans.Objects.To_Object (From.First_Name); when FIELD_LAST_NAME => return Util.Beans.Objects.To_Object (From.Last_Name); when FIELD_AGE => return Util.Beans.Objects.To_Object (From.Age); when FIELD_NAME => return Util.Beans.Objects.To_Object (From.Name); when FIELD_USER_NAME => return Util.Beans.Objects.To_Object (From.Username); when FIELD_LINK => return Util.Beans.Objects.To_Object (From.Link); when FIELD_GENDER => return Util.Beans.Objects.To_Object (From.Gender); when FIELD_ID => return Util.Beans.Objects.To_Object (From.Id); end case; end Get_Person_Member; -- ------------------------------ -- Set the name/value pair on the current object. -- ------------------------------ procedure Set_Member (Addr : in out Address; Field : in Address_Fields; Value : in Util.Beans.Objects.Object) is begin case Field is when FIELD_CITY => Addr.City := To_Unbounded_String (Value); when FIELD_STREET => Addr.Street := To_Unbounded_String (Value); when FIELD_COUNTRY => Addr.Country := To_Unbounded_String (Value); when FIELD_ZIP => Addr.Zip := To_Integer (Value); end case; end Set_Member; function Get_Address_Member (Addr : in Address; Field : in Address_Fields) return Util.Beans.Objects.Object is begin case Field is when FIELD_CITY => return Util.Beans.Objects.To_Object (Addr.City); when FIELD_STREET => return Util.Beans.Objects.To_Object (Addr.Street); when FIELD_COUNTRY => return Util.Beans.Objects.To_Object (Addr.Country); when FIELD_ZIP => return Util.Beans.Objects.To_Object (Addr.Zip); end case; end Get_Address_Member; package Address_Mapper is new Util.Serialize.Mappers.Record_Mapper (Element_Type => Address, Element_Type_Access => Address_Access, Fields => Address_Fields, Set_Member => Set_Member); -- Mapping for the Property record. Property_Mapping : aliased Property_Mapper.Mapper; -- Mapping for the Address record. Address_Mapping : aliased Address_Mapper.Mapper; -- Mapping for the Person record. Person_Mapping : aliased Person_Mapper.Mapper; -- ------------------------------ -- Get the address mapper which describes how to load an Address. -- ------------------------------ function Get_Address_Mapper return Util.Serialize.Mappers.Mapper_Access is begin return Address_Mapping'Access; end Get_Address_Mapper; -- ------------------------------ -- Get the person mapper which describes how to load a Person. -- ------------------------------ function Get_Person_Mapper return Person_Mapper.Mapper_Access is begin return Person_Mapping'Access; end Get_Person_Mapper; -- ------------------------------ -- Helper to give access to the <b>Address</b> member of a <b>Person</b>. -- ------------------------------ procedure Proxy_Address (Attr : in Util.Serialize.Mappers.Mapping'Class; Element : in out Person; Value : in Util.Beans.Objects.Object) is begin Address_Mapper.Set_Member (Attr, Element.Addr, Value); end Proxy_Address; begin Property_Mapping.Add_Default_Mapping; -- XML: JSON: -- ---- ----- -- <city>Paris</city> "city" : "Paris" -- <street>Champs de Mars</street> "street" : "Champs de Mars" -- <country>France</country> "country" : "France" -- <zip>75</zip> "zip" : 75 Address_Mapping.Bind (Get_Address_Member'Access); -- Address_Mapping.Add_Mapping ("info", Property_Mapping'Access, Proxy_Info'Access); Address_Mapping.Add_Default_Mapping; -- XML: -- ---- -- <xxx id='23'> -- <address> -- <city>...</city> -- <street number='44'>..</street> -- <country>..</country> -- <zip>..</zip> -- </address> -- <name>John</name> -- <last_name>Harry</last_name> -- <age>23</age> -- <info><facebook><id>...</id></facebook></info> -- </xxx> -- Person_Mapper.Add_Mapping ("@id"); Person_Mapping.Bind (Get_Person_Member'Access); Person_Mapping.Add_Mapping ("address", Address_Mapping'Access, Proxy_Address'Access); Person_Mapping.Add_Default_Mapping; -- Person_Mapper.Add_Mapping ("info/*"); -- Person_Mapper.Add_Mapping ("address/street/@number"); end Mapping;
-- Copyright (C) 2008-2011 Maciej Sobczak -- Distributed under the Boost Software License, Version 1.0. -- (See accompanying file LICENSE_1_0.txt or copy at -- http://www.boost.org/LICENSE_1_0.txt) package SOCI.Oracle is -- -- Registers the Oracle backend so that it is ready for use -- by the dynamic backend loader. -- procedure Register_Factory_Oracle; pragma Import (C, Register_Factory_Oracle, "register_factory_oracle"); end SOCI.Oracle;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2010-2012, Vadim Godunko <vgodunko@gmail.com> -- -- All rights reserved. -- -- -- -- Redistribution and use in source and binary forms, with or without -- -- modification, are permitted provided that the following conditions -- -- are met: -- -- -- -- * Redistributions of source code must retain the above copyright -- -- notice, this list of conditions and the following disclaimer. -- -- -- -- * Redistributions in binary form must reproduce the above copyright -- -- notice, this list of conditions and the following disclaimer in the -- -- documentation and/or other materials provided with the distribution. -- -- -- -- * Neither the name of the Vadim Godunko, IE nor the names of its -- -- contributors may be used to endorse or promote products derived from -- -- this software without specific prior written permission. -- -- -- -- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -- -- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -- -- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -- -- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -- -- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -- -- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -- -- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -- -- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -- -- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -- -- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -- -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -- -- ------------------------------------------------------------------------------ -- $Revision$ $Date$ ------------------------------------------------------------------------------ with Ada.Unchecked_Deallocation; with Matreshka.Atomics.Generic_Test_And_Set; with Matreshka.Internals.Strings.Operations; package body Matreshka.Internals.Regexps is use Matreshka.Internals.Strings; use Matreshka.Internals.Utf16; function Test_And_Set is new Matreshka.Atomics.Generic_Test_And_Set (Shared_String, Shared_String_Access); ------------- -- Capture -- ------------- function Capture (Item : not null Shared_Match_Access; Number : Natural) return not null Matreshka.Internals.Strings.Shared_String_Access is Aux : Shared_String_Access := Item.Captures (Number); begin if Aux = null then Aux := Operations.Slice (Item.Source, Item.Slices (Number).First_Position, Item.Slices (Number).Next_Position - Item.Slices (Number).First_Position, Item.Slices (Number).Next_Index - Item.Slices (Number).First_Index); if not Test_And_Set (Item.Captures (Number), null, Aux) then -- Operation can fail when capture is computed by another thread. -- In this case computed capture is dereferenced and another -- value is used. Dereference (Aux); Aux := Item.Captures (Number); end if; end if; Reference (Aux); return Aux; end Capture; ----------------- -- Dereference -- ----------------- procedure Dereference (Item : in out Shared_Match_Access) is pragma Assert (Item /= null); procedure Free is new Ada.Unchecked_Deallocation (Shared_Match, Shared_Match_Access); begin if Item /= Empty_Shared_Match'Access and then Matreshka.Atomics.Counters.Decrement (Item.Counter) then if Item.Source /= null then Dereference (Item.Source); end if; for J in Item.Captures'Range loop if Item.Captures (J) /= null then Dereference (Item.Captures (J)); end if; end loop; Free (Item); else Item := null; end if; end Dereference; ----------------- -- Dereference -- ----------------- procedure Dereference (Item : in out Shared_Pattern_Access) is pragma Assert (Item /= null); procedure Free is new Ada.Unchecked_Deallocation (Shared_Pattern, Shared_Pattern_Access); begin if Item /= Empty_Shared_Pattern'Access and then Matreshka.Atomics.Counters.Decrement (Item.Counter) then Free (Item); else Item := null; end if; end Dereference; --------------- -- Reference -- --------------- procedure Reference (Item : not null Shared_Match_Access) is begin if Item /= Empty_Shared_Match'Access then Matreshka.Atomics.Counters.Increment (Item.Counter); end if; end Reference; --------------- -- Reference -- --------------- procedure Reference (Item : not null Shared_Pattern_Access) is begin if Item /= Empty_Shared_Pattern'Access then Matreshka.Atomics.Counters.Increment (Item.Counter); end if; end Reference; end Matreshka.Internals.Regexps;
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="15"> <syndb class_id="0" tracking_level="0" version="0"> <userIPLatency>-1</userIPLatency> <userIPName></userIPName> <cdfg class_id="1" tracking_level="1" version="0" object_id="_0"> <name>gry2rgb</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="3" tracking_level="1" version="0" object_id="_1"> <Value class_id="4" tracking_level="0" version="0"> <Obj class_id="5" tracking_level="0" version="0"> <type>1</type> <id>1</id> <name>input_mat_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo class_id="6" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>input_mat.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <direction>0</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs class_id="7" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_2"> <Value> <Obj> <type>1</type> <id>2</id> <name>output_mat_data_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>output_mat.data.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>17</bitwidth> </Value> <direction>1</direction> <if_type>3</if_type> <array_size>0</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>5</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>145</lineNumber> <contextFuncName>gry2rgb</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="10" tracking_level="0" version="0"> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second class_id="11" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="12" tracking_level="0" version="0"> <first class_id="13" tracking_level="0" version="0"> <first>hls_video_block.cpp</first> <second>gry2rgb</second> </first> <second>145</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>23</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.65</m_delay> <m_topoIndex>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>7</id> <name>indvar_flatten</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>25</item> <item>26</item> <item>27</item> <item>28</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>8</id> <name>exitcond_flatten</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>29</item> <item>31</item> </oprand_edges> <opcode>icmp</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.07</m_delay> <m_topoIndex>3</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>9</id> <name>indvar_flatten_next</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>32</item> <item>34</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.89</m_delay> <m_topoIndex>4</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>10</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>35</item> <item>36</item> <item>37</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>14</id> <name>input_mat_data_V_rea</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>39</item> <item>40</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.83</m_delay> <m_topoIndex>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>15</id> <name>input_pixel_V</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>input_pixel.V</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>41</item> <item>43</item> <item>45</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.17</m_delay> <m_topoIndex>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>16</id> <name>tmp</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>17</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>47</item> <item>48</item> <item>49</item> <item>50</item> </oprand_edges> <opcode>bitconcatenate</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>17</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>152</lineNumber> <contextFuncName>gry2rgb</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>gry2rgb</second> </first> <second>152</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>52</item> <item>53</item> <item>54</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>1.83</m_delay> <m_topoIndex>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>19</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>146</lineNumber> <contextFuncName>gry2rgb</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>gry2rgb</second> </first> <second>146</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>55</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>21</id> <name></name> <fileName>hls_video_block.cpp</fileName> <fileDirectory>C:\Users\parkerh\Documents\2d_filter_xfopencv</fileDirectory> <lineNumber>155</lineNumber> <contextFuncName>gry2rgb</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>C:\Users\parkerh\Documents\2d_filter_xfopencv</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>hls_video_block.cpp</first> <second>gry2rgb</second> </first> <second>155</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>0</count> <item_version>0</item_version> </oprand_edges> <opcode>ret</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.00</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>5</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_14"> <Value> <Obj> <type>2</type> <id>24</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_15"> <Value> <Obj> <type>2</type> <id>30</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <const_type>0</const_type> <content>921600</content> </item> <item class_id_reference="16" object_id="_16"> <Value> <Obj> <type>2</type> <id>33</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>20</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_17"> <Value> <Obj> <type>2</type> <id>42</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <const_type>0</const_type> <content>255</content> </item> <item class_id_reference="16" object_id="_18"> <Value> <Obj> <type>2</type> <id>44</id> <name>empty</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_19"> <Obj> <type>3</type> <id>6</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>5</item> </node_objs> </item> <item class_id_reference="18" object_id="_20"> <Obj> <type>3</type> <id>11</id> <name>.preheader</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>4</count> <item_version>0</item_version> <item>7</item> <item>8</item> <item>9</item> <item>10</item> </node_objs> </item> <item class_id_reference="18" object_id="_21"> <Obj> <type>3</type> <id>20</id> <name>.preheader.preheader</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>5</count> <item_version>0</item_version> <item>14</item> <item>15</item> <item>16</item> <item>17</item> <item>19</item> </node_objs> </item> <item class_id_reference="18" object_id="_22"> <Obj> <type>3</type> <id>22</id> <name></name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <node_objs> <count>1</count> <item_version>0</item_version> <item>21</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>26</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_23"> <id>23</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>5</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_24"> <id>25</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_25"> <id>26</id> <edge_type>2</edge_type> <source_obj>6</source_obj> <sink_obj>7</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_26"> <id>27</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>7</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_27"> <id>28</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>7</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_28"> <id>29</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_29"> <id>31</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>8</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_30"> <id>32</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_31"> <id>34</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>9</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_32"> <id>35</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_33"> <id>36</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_34"> <id>37</id> <edge_type>2</edge_type> <source_obj>22</source_obj> <sink_obj>10</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_35"> <id>40</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>14</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_36"> <id>41</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_37"> <id>43</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_38"> <id>45</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>15</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_39"> <id>48</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_40"> <id>49</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_41"> <id>50</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>16</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_42"> <id>53</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_43"> <id>54</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>17</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_44"> <id>55</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_45"> <id>113</id> <edge_type>2</edge_type> <source_obj>6</source_obj> <sink_obj>11</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_46"> <id>114</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_47"> <id>115</id> <edge_type>2</edge_type> <source_obj>11</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_48"> <id>116</id> <edge_type>2</edge_type> <source_obj>20</source_obj> <sink_obj>11</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_49"> <mId>1</mId> <mTag>gry2rgb</mTag> <mType>0</mType> <sub_regions> <count>3</count> <item_version>0</item_version> <item>2</item> <item>3</item> <item>4</item> </sub_regions> <basic_blocks> <count>0</count> <item_version>0</item_version> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>921602</mMinLatency> <mMaxLatency>921602</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_50"> <mId>2</mId> <mTag>Entry</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>6</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_51"> <mId>3</mId> <mTag>Loop 1</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>20</item> </basic_blocks> <mII>1</mII> <mDepth>2</mDepth> <mMinTripCount>921600</mMinTripCount> <mMaxTripCount>921600</mMaxTripCount> <mMinLatency>921600</mMinLatency> <mMaxLatency>921600</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_52"> <mId>4</mId> <mTag>Return</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>1</count> <item_version>0</item_version> <item>22</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>0</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="-1"></res> <node_label_latency class_id="26" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>5</first> <second class_id="28" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>7</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>8</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>9</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>10</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>15</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>3</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="29" tracking_level="0" version="0"> <count>4</count> <item_version>0</item_version> <item class_id="30" tracking_level="0" version="0"> <first>6</first> <second class_id="31" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>20</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>22</first> <second> <first>2</first> <second>2</second> </second> </item> </bblk_ent_exit> <regions class_id="32" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="33" tracking_level="1" version="0" object_id="_53"> <region_name>Loop 1</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>11</item> <item>20</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>1</interval> <pipe_depth>2</pipe_depth> </item> </regions> <dp_fu_nodes class_id="34" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_expression> <dp_fu_nodes_module> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_module> <dp_fu_nodes_io> <count>0</count> <item_version>0</item_version> </dp_fu_nodes_io> <return_ports> <count>0</count> <item_version>0</item_version> </return_ports> <dp_mem_port_nodes class_id="36" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_mem_port_nodes> <dp_reg_nodes> <count>0</count> <item_version>0</item_version> </dp_reg_nodes> <dp_regname_nodes> <count>0</count> <item_version>0</item_version> </dp_regname_nodes> <dp_reg_phi> <count>0</count> <item_version>0</item_version> </dp_reg_phi> <dp_regname_phi> <count>0</count> <item_version>0</item_version> </dp_regname_phi> <dp_port_io_nodes class_id="37" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="38" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </port2core> <node2core> <count>0</count> <item_version>0</item_version> </node2core> </syndb> </boost_serialization>
----------------------------------------------------------------------- -- keystore-passwords-tests -- Tests for Keystore.Passwords -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Unchecked_Deallocation; with Ada.Streams.Stream_IO; with Util.Test_Caller; with Util.Encoders.SHA256; with Util.Encoders.HMAC.SHA256; with Keystore.Tests; with Keystore.Passwords.Keys; with Keystore.Passwords.Files; package body Keystore.Passwords.Tests is use type Ada.Streams.Stream_Element_Array; package Caller is new Util.Test_Caller (Test, "AKT.Passwords"); function Hash (Provider : in Keys.Key_Provider_Access) return Util.Encoders.SHA256.Hash_Array; procedure Free is new Ada.Unchecked_Deallocation (Object => Keys.Key_Provider'Class, Name => Keys.Key_Provider_Access); procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is begin Caller.Add_Test (Suite, "Test Keystore.Passwords.Files", Test_File_Password'Access); end Add_Tests; function Hash (Provider : in Keys.Key_Provider_Access) return Util.Encoders.SHA256.Hash_Array is Context : Util.Encoders.HMAC.SHA256.Context; Key : Secret_Key (Length => 32); IV : Secret_Key (Length => 16); Sign : Secret_Key (Length => 32); Result : Util.Encoders.SHA256.Hash_Array; begin Provider.Get_Keys (Key, IV, Sign); Util.Encoders.HMAC.SHA256.Set_Key (Context, Key); Util.Encoders.HMAC.SHA256.Update (Context, IV); Util.Encoders.HMAC.SHA256.Update (Context, Sign); Util.Encoders.HMAC.SHA256.Finish (Context, Result); return Result; end Hash; -- ------------------------------ -- Test the using the Passwords.Files -- ------------------------------ procedure Test_File_Password (T : in out Test) is Path : constant String := Util.Tests.Get_Test_Path ("regtests/result/pass/key1.bin"); Provider1 : Keys.Key_Provider_Access; Provider2 : Keys.Key_Provider_Access; Hash1 : Util.Encoders.SHA256.Hash_Array; Hash2 : Util.Encoders.SHA256.Hash_Array; File : Ada.Streams.Stream_IO.File_Type; begin Provider1 := Files.Generate (Path); Provider2 := Files.Create (Path); Hash1 := Hash (Provider1); Hash2 := Hash (Provider2); T.Assert (Hash1 = Hash2, "Generate and Create are inconsistent"); Free (Provider1); Provider1 := Files.Generate (Path); Hash1 := Hash (Provider1); T.Assert (Hash1 /= Hash2, "Generate and Create are inconsistent"); Free (Provider1); Free (Provider2); Ada.Streams.Stream_IO.Create (File, Ada.Streams.Stream_IO.Out_File, Path); Ada.Streams.Stream_IO.Close (File); begin Provider2 := Files.Create (Path); T.Fail ("No exception raised for an empty file"); exception when Bad_Password => null; end; Ada.Streams.Stream_IO.Create (File, Ada.Streams.Stream_IO.Out_File, Path); for I in 1 .. 200 loop Ada.Streams.Stream_IO.Write (File, Hash1); end loop; Ada.Streams.Stream_IO.Close (File); begin Provider2 := Files.Create (Path); T.Fail ("No exception raised for a big file"); exception when Bad_Password => null; end; if not Keystore.Tests.Is_Windows then begin Provider2 := Files.Create ("Makefile.conf"); T.Fail ("No exception raised for a file stored in an unprotected dir"); exception when Bad_Password => null; end; end if; end Test_File_Password; end Keystore.Passwords.Tests;
-- This spec has been automatically generated from STM32L4x5.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.DMA is pragma Preelaborate; --------------- -- Registers -- --------------- -- interrupt status register type ISR_Register is record -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF1 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF1 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF1 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF1 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF2 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF2 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF2 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF2 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF3 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF3 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF3 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF3 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF4 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF4 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF4 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF4 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF5 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF5 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF5 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF5 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF6 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF6 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF6 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF6 : Boolean; -- Read-only. Channel x global interrupt flag (x = 1 ..7) GIF7 : Boolean; -- Read-only. Channel x transfer complete flag (x = 1 ..7) TCIF7 : Boolean; -- Read-only. Channel x half transfer flag (x = 1 ..7) HTIF7 : Boolean; -- Read-only. Channel x transfer error flag (x = 1 ..7) TEIF7 : Boolean; -- unspecified Reserved_28_31 : HAL.UInt4; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record GIF1 at 0 range 0 .. 0; TCIF1 at 0 range 1 .. 1; HTIF1 at 0 range 2 .. 2; TEIF1 at 0 range 3 .. 3; GIF2 at 0 range 4 .. 4; TCIF2 at 0 range 5 .. 5; HTIF2 at 0 range 6 .. 6; TEIF2 at 0 range 7 .. 7; GIF3 at 0 range 8 .. 8; TCIF3 at 0 range 9 .. 9; HTIF3 at 0 range 10 .. 10; TEIF3 at 0 range 11 .. 11; GIF4 at 0 range 12 .. 12; TCIF4 at 0 range 13 .. 13; HTIF4 at 0 range 14 .. 14; TEIF4 at 0 range 15 .. 15; GIF5 at 0 range 16 .. 16; TCIF5 at 0 range 17 .. 17; HTIF5 at 0 range 18 .. 18; TEIF5 at 0 range 19 .. 19; GIF6 at 0 range 20 .. 20; TCIF6 at 0 range 21 .. 21; HTIF6 at 0 range 22 .. 22; TEIF6 at 0 range 23 .. 23; GIF7 at 0 range 24 .. 24; TCIF7 at 0 range 25 .. 25; HTIF7 at 0 range 26 .. 26; TEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; -- interrupt flag clear register type IFCR_Register is record -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF1 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF1 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF1 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF1 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF2 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF2 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF2 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF2 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF3 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF3 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF3 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF3 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF4 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF4 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF4 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF4 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF5 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF5 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF5 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF5 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF6 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF6 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF6 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF6 : Boolean := False; -- Write-only. Channel x global interrupt clear (x = 1 ..7) CGIF7 : Boolean := False; -- Write-only. Channel x transfer complete clear (x = 1 ..7) CTCIF7 : Boolean := False; -- Write-only. Channel x half transfer clear (x = 1 ..7) CHTIF7 : Boolean := False; -- Write-only. Channel x transfer error clear (x = 1 ..7) CTEIF7 : Boolean := False; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for IFCR_Register use record CGIF1 at 0 range 0 .. 0; CTCIF1 at 0 range 1 .. 1; CHTIF1 at 0 range 2 .. 2; CTEIF1 at 0 range 3 .. 3; CGIF2 at 0 range 4 .. 4; CTCIF2 at 0 range 5 .. 5; CHTIF2 at 0 range 6 .. 6; CTEIF2 at 0 range 7 .. 7; CGIF3 at 0 range 8 .. 8; CTCIF3 at 0 range 9 .. 9; CHTIF3 at 0 range 10 .. 10; CTEIF3 at 0 range 11 .. 11; CGIF4 at 0 range 12 .. 12; CTCIF4 at 0 range 13 .. 13; CHTIF4 at 0 range 14 .. 14; CTEIF4 at 0 range 15 .. 15; CGIF5 at 0 range 16 .. 16; CTCIF5 at 0 range 17 .. 17; CHTIF5 at 0 range 18 .. 18; CTEIF5 at 0 range 19 .. 19; CGIF6 at 0 range 20 .. 20; CTCIF6 at 0 range 21 .. 21; CHTIF6 at 0 range 22 .. 22; CTEIF6 at 0 range 23 .. 23; CGIF7 at 0 range 24 .. 24; CTCIF7 at 0 range 25 .. 25; CHTIF7 at 0 range 26 .. 26; CTEIF7 at 0 range 27 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; subtype CCR_PSIZE_Field is HAL.UInt2; subtype CCR_MSIZE_Field is HAL.UInt2; subtype CCR_PL_Field is HAL.UInt2; -- channel x configuration register type CCR_Register is record -- Channel enable EN : Boolean := False; -- Transfer complete interrupt enable TCIE : Boolean := False; -- Half transfer interrupt enable HTIE : Boolean := False; -- Transfer error interrupt enable TEIE : Boolean := False; -- Data transfer direction DIR : Boolean := False; -- Circular mode CIRC : Boolean := False; -- Peripheral increment mode PINC : Boolean := False; -- Memory increment mode MINC : Boolean := False; -- Peripheral size PSIZE : CCR_PSIZE_Field := 16#0#; -- Memory size MSIZE : CCR_MSIZE_Field := 16#0#; -- Channel priority level PL : CCR_PL_Field := 16#0#; -- Memory to memory mode MEM2MEM : Boolean := False; -- unspecified Reserved_15_31 : HAL.UInt17 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CCR_Register use record EN at 0 range 0 .. 0; TCIE at 0 range 1 .. 1; HTIE at 0 range 2 .. 2; TEIE at 0 range 3 .. 3; DIR at 0 range 4 .. 4; CIRC at 0 range 5 .. 5; PINC at 0 range 6 .. 6; MINC at 0 range 7 .. 7; PSIZE at 0 range 8 .. 9; MSIZE at 0 range 10 .. 11; PL at 0 range 12 .. 13; MEM2MEM at 0 range 14 .. 14; Reserved_15_31 at 0 range 15 .. 31; end record; subtype CNDTR_NDT_Field is HAL.UInt16; -- channel x number of data register type CNDTR_Register is record -- Number of data to transfer NDT : CNDTR_NDT_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CNDTR_Register use record NDT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CSELR_C1S_Field is HAL.UInt4; subtype CSELR_C2S_Field is HAL.UInt4; subtype CSELR_C3S_Field is HAL.UInt4; subtype CSELR_C4S_Field is HAL.UInt4; subtype CSELR_C5S_Field is HAL.UInt4; subtype CSELR_C6S_Field is HAL.UInt4; subtype CSELR_C7S_Field is HAL.UInt4; -- channel selection register type CSELR_Register is record -- DMA channel 1 selection C1S : CSELR_C1S_Field := 16#0#; -- DMA channel 2 selection C2S : CSELR_C2S_Field := 16#0#; -- DMA channel 3 selection C3S : CSELR_C3S_Field := 16#0#; -- DMA channel 4 selection C4S : CSELR_C4S_Field := 16#0#; -- DMA channel 5 selection C5S : CSELR_C5S_Field := 16#0#; -- DMA channel 6 selection C6S : CSELR_C6S_Field := 16#0#; -- DMA channel 7 selection C7S : CSELR_C7S_Field := 16#0#; -- unspecified Reserved_28_31 : HAL.UInt4 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CSELR_Register use record C1S at 0 range 0 .. 3; C2S at 0 range 4 .. 7; C3S at 0 range 8 .. 11; C4S at 0 range 12 .. 15; C5S at 0 range 16 .. 19; C6S at 0 range 20 .. 23; C7S at 0 range 24 .. 27; Reserved_28_31 at 0 range 28 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Direct memory access controller type DMA_Peripheral is record -- interrupt status register ISR : aliased ISR_Register; -- interrupt flag clear register IFCR : aliased IFCR_Register; -- channel x configuration register CCR1 : aliased CCR_Register; -- channel x number of data register CNDTR1 : aliased CNDTR_Register; -- channel x peripheral address register CPAR1 : aliased HAL.UInt32; -- channel x memory address register CMAR1 : aliased HAL.UInt32; -- channel x configuration register CCR2 : aliased CCR_Register; -- channel x number of data register CNDTR2 : aliased CNDTR_Register; -- channel x peripheral address register CPAR2 : aliased HAL.UInt32; -- channel x memory address register CMAR2 : aliased HAL.UInt32; -- channel x configuration register CCR3 : aliased CCR_Register; -- channel x number of data register CNDTR3 : aliased CNDTR_Register; -- channel x peripheral address register CPAR3 : aliased HAL.UInt32; -- channel x memory address register CMAR3 : aliased HAL.UInt32; -- channel x configuration register CCR4 : aliased CCR_Register; -- channel x number of data register CNDTR4 : aliased CNDTR_Register; -- channel x peripheral address register CPAR4 : aliased HAL.UInt32; -- channel x memory address register CMAR4 : aliased HAL.UInt32; -- channel x configuration register CCR5 : aliased CCR_Register; -- channel x number of data register CNDTR5 : aliased CNDTR_Register; -- channel x peripheral address register CPAR5 : aliased HAL.UInt32; -- channel x memory address register CMAR5 : aliased HAL.UInt32; -- channel x configuration register CCR6 : aliased CCR_Register; -- channel x number of data register CNDTR6 : aliased CNDTR_Register; -- channel x peripheral address register CPAR6 : aliased HAL.UInt32; -- channel x memory address register CMAR6 : aliased HAL.UInt32; -- channel x configuration register CCR7 : aliased CCR_Register; -- channel x number of data register CNDTR7 : aliased CNDTR_Register; -- channel x peripheral address register CPAR7 : aliased HAL.UInt32; -- channel x memory address register CMAR7 : aliased HAL.UInt32; -- channel selection register CSELR : aliased CSELR_Register; end record with Volatile; for DMA_Peripheral use record ISR at 16#0# range 0 .. 31; IFCR at 16#4# range 0 .. 31; CCR1 at 16#8# range 0 .. 31; CNDTR1 at 16#C# range 0 .. 31; CPAR1 at 16#10# range 0 .. 31; CMAR1 at 16#14# range 0 .. 31; CCR2 at 16#1C# range 0 .. 31; CNDTR2 at 16#20# range 0 .. 31; CPAR2 at 16#24# range 0 .. 31; CMAR2 at 16#28# range 0 .. 31; CCR3 at 16#30# range 0 .. 31; CNDTR3 at 16#34# range 0 .. 31; CPAR3 at 16#38# range 0 .. 31; CMAR3 at 16#3C# range 0 .. 31; CCR4 at 16#44# range 0 .. 31; CNDTR4 at 16#48# range 0 .. 31; CPAR4 at 16#4C# range 0 .. 31; CMAR4 at 16#50# range 0 .. 31; CCR5 at 16#58# range 0 .. 31; CNDTR5 at 16#5C# range 0 .. 31; CPAR5 at 16#60# range 0 .. 31; CMAR5 at 16#64# range 0 .. 31; CCR6 at 16#6C# range 0 .. 31; CNDTR6 at 16#70# range 0 .. 31; CPAR6 at 16#74# range 0 .. 31; CMAR6 at 16#78# range 0 .. 31; CCR7 at 16#80# range 0 .. 31; CNDTR7 at 16#84# range 0 .. 31; CPAR7 at 16#88# range 0 .. 31; CMAR7 at 16#8C# range 0 .. 31; CSELR at 16#A8# range 0 .. 31; end record; -- Direct memory access controller DMA1_Periph : aliased DMA_Peripheral with Import, Address => System'To_Address (16#40020000#); -- Direct memory access controller DMA2_Periph : aliased DMA_Peripheral with Import, Address => System'To_Address (16#40020400#); end STM32_SVD.DMA;
with Ada.Text_IO; with kv.avm.vole_tree; use kv.avm.vole_tree; with kv.avm.Tree_Visitors; use kv.avm.Tree_Visitors; package kv.avm.Tree_Rewrite is type Rewriter_Class is limited new Visitor_Class with record Temp : Natural := 0; Block : Natural := 0; end record; procedure Init (Self : in out Rewriter_Class); procedure Finalize (Self : in out Rewriter_Class); function Next_Temp(Self : access Rewriter_Class; Src_Line : Positive) return String; function Next_Block(Self : access Rewriter_Class) return String; overriding procedure Visit_Id (Self : in out Rewriter_Class; Target : in out Id_Node_Class'CLASS; Depth : in Natural); overriding procedure Visit_Actor_Definition (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Attribute_Definition (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Message_Definition (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Kind_Node (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Argument (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Constructor_Send_Node (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_List (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_Op (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_Var (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_Literal (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_Send (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Expression_Fold (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_List (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Assign (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Var_Def (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Emit (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Return (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_If (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Assert (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_Send (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Statement_While (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Program (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); overriding procedure Visit_Unimp (Self : in out Rewriter_Class; Target : in out Node_Base_Class'CLASS; Depth : in Natural); end kv.avm.Tree_Rewrite;
with Ada.Text_IO;use Ada.Text_IO; with Ada.Float_Text_IO;use Ada.Float_Text_IO; procedure newton is Number: Float; Accuracy: Float; a0: Float; ak: Float; begin put("Enter your number : "); get(Number); put("Enter the accuracy : "); get(Accuracy); a0 := 1.0; ak := 1.0; loop a0 := ak; ak := (a0 + Number / a0) / 2.0; exit when ak - a0 < Accuracy or (ak ** 2) - Number < Accuracy; end loop; put("the square root is : " &Float'Image(ak)); end newton;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- Sample.Curses_Demo.Attributes -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright 2020 Thomas E. Dickey -- -- Copyright 1998-2002,2003 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control -- $Revision: 1.14 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses; use Terminal_Interface.Curses; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; with Sample.Manifest; use Sample.Manifest; with Sample.Function_Key_Setting; use Sample.Function_Key_Setting; with Sample.Keyboard_Handler; use Sample.Keyboard_Handler; with Sample.Explanation; use Sample.Explanation; package body Sample.Curses_Demo.Attributes is procedure Demo is P : Panel := Create (Standard_Window); K : Real_Key_Code; begin Set_Meta_Mode; Set_KeyPad_Mode; Top (P); Push_Environment ("ATTRIBDEMO"); Default_Labels; Notepad ("ATTRIB-PAD00"); Set_Character_Attributes (Attr => (others => False)); Add (Line => 1, Column => Columns / 2 - 10, Str => "This is NORMAL"); Set_Character_Attributes (Attr => (Stand_Out => True, others => False)); Add (Line => 2, Column => Columns / 2 - 10, Str => "This is Stand_Out"); Set_Character_Attributes (Attr => (Under_Line => True, others => False)); Add (Line => 3, Column => Columns / 2 - 10, Str => "This is Under_Line"); Set_Character_Attributes (Attr => (Reverse_Video => True, others => False)); Add (Line => 4, Column => Columns / 2 - 10, Str => "This is Reverse_Video"); Set_Character_Attributes (Attr => (Blink => True, others => False)); Add (Line => 5, Column => Columns / 2 - 10, Str => "This is Blink"); Set_Character_Attributes (Attr => (Dim_Character => True, others => False)); Add (Line => 6, Column => Columns / 2 - 10, Str => "This is Dim_Character"); Set_Character_Attributes (Attr => (Bold_Character => True, others => False)); Add (Line => 7, Column => Columns / 2 - 10, Str => "This is Bold_Character"); Refresh_Without_Update; Update_Panels; Update_Screen; loop K := Get_Key; if K in Special_Key_Code'Range then case K is when QUIT_CODE => exit; when HELP_CODE => Explain_Context; when EXPLAIN_CODE => Explain ("ATTRIBKEYS"); when others => null; end case; end if; end loop; Pop_Environment; Clear; Refresh_Without_Update; Delete (P); Update_Panels; Update_Screen; end Demo; end Sample.Curses_Demo.Attributes;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 1 7 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2021, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- -- -- -- -- -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_17 is subtype Bit_Order is System.Bit_Order; Reverse_Bit_Order : constant Bit_Order := Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order)); subtype Ofs is System.Storage_Elements.Storage_Offset; subtype Uns is System.Unsigned_Types.Unsigned; subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7; use type System.Storage_Elements.Storage_Offset; use type System.Unsigned_Types.Unsigned; type Cluster is record E0, E1, E2, E3, E4, E5, E6, E7 : Bits_17; end record; for Cluster use record E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1; E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1; E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1; E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1; E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1; E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1; E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1; E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1; end record; for Cluster'Size use Bits * 8; for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment, 1 + 1 * Boolean'Pos (Bits mod 2 = 0) + 2 * Boolean'Pos (Bits mod 4 = 0)); -- Use maximum possible alignment, given the bit field size, since this -- will result in the most efficient code possible for the field. type Cluster_Ref is access Cluster; type Rev_Cluster is new Cluster with Bit_Order => Reverse_Bit_Order, Scalar_Storage_Order => Reverse_Bit_Order; type Rev_Cluster_Ref is access Rev_Cluster; ------------ -- Get_17 -- ------------ function Get_17 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_17 is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => return RC.E0; when 1 => return RC.E1; when 2 => return RC.E2; when 3 => return RC.E3; when 4 => return RC.E4; when 5 => return RC.E5; when 6 => return RC.E6; when 7 => return RC.E7; end case; else case N07 (Uns (N) mod 8) is when 0 => return C.E0; when 1 => return C.E1; when 2 => return C.E2; when 3 => return C.E3; when 4 => return C.E4; when 5 => return C.E5; when 6 => return C.E6; when 7 => return C.E7; end case; end if; end Get_17; ------------ -- Set_17 -- ------------ procedure Set_17 (Arr : System.Address; N : Natural; E : Bits_17; Rev_SSO : Boolean) is A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8); C : Cluster_Ref with Address => A'Address, Import; RC : Rev_Cluster_Ref with Address => A'Address, Import; begin if Rev_SSO then case N07 (Uns (N) mod 8) is when 0 => RC.E0 := E; when 1 => RC.E1 := E; when 2 => RC.E2 := E; when 3 => RC.E3 := E; when 4 => RC.E4 := E; when 5 => RC.E5 := E; when 6 => RC.E6 := E; when 7 => RC.E7 := E; end case; else case N07 (Uns (N) mod 8) is when 0 => C.E0 := E; when 1 => C.E1 := E; when 2 => C.E2 := E; when 3 => C.E3 := E; when 4 => C.E4 := E; when 5 => C.E5 := E; when 6 => C.E6 := E; when 7 => C.E7 := E; end case; end if; end Set_17; end System.Pack_17;
with AdaM.a_Type.enumeration_literal, gtk.Widget; private with gtk.gEntry, gtk.Box, gtk.Button; limited with adam.a_Type.enumeration_type; package aIDE.Editor.of_enumeration_literal is type Item is new Editor.item with private; type View is access all Item'Class; type enumeration_type_view is access all AdaM.a_Type.enumeration_type.item'Class; package Forge is function to_Editor (the_Target : in AdaM.a_Type.enumeration_literal.view; targets_Parent : in enumeration_type_view) return View; end Forge; overriding function top_Widget (Self : in Item) return gtk.Widget.Gtk_Widget; private use gtk.Button, gtk.gEntry, gtk.Box; type Item is new Editor.item with record Target : AdaM.a_Type.enumeration_literal.view; Targets_Parent : enumeration_type_view; top_Box : gtk_Box; name_Entry : Gtk_Entry; rid_Button : gtk_Button; end record; end aIDE.Editor.of_enumeration_literal;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ADA.STRINGS.UTF_ENCODING.WIDE_STRINGS -- -- -- -- B o d y -- -- -- -- Copyright (C) 2010-2019, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ package body Ada.Strings.UTF_Encoding.Wide_Strings is use Interfaces; ------------ -- Decode -- ------------ -- Decode UTF-8/UTF-16BE/UTF-16LE input to Wide_String function Decode (Item : UTF_String; Input_Scheme : Encoding_Scheme) return Wide_String is begin if Input_Scheme = UTF_8 then return Decode (Item); else return Decode (To_UTF_16 (Item, Input_Scheme)); end if; end Decode; -- Decode UTF-8 input to Wide_String function Decode (Item : UTF_8_String) return Wide_String is Result : Wide_String (1 .. Item'Length); -- Result string (worst case is same length as input) Len : Natural := 0; -- Length of result stored so far Iptr : Natural; -- Input Item pointer C : Unsigned_8; R : Unsigned_16; procedure Get_Continuation; -- Reads a continuation byte of the form 10xxxxxx, shifts R left by 6 -- bits, and or's in the xxxxxx to the low order 6 bits. On return Ptr -- is incremented. Raises exception if continuation byte does not exist -- or is invalid. ---------------------- -- Get_Continuation -- ---------------------- procedure Get_Continuation is begin if Iptr > Item'Last then Raise_Encoding_Error (Iptr - 1); else C := To_Unsigned_8 (Item (Iptr)); Iptr := Iptr + 1; if C not in 2#10_000000# .. 2#10_111111# then Raise_Encoding_Error (Iptr - 1); else R := Shift_Left (R, 6) or Unsigned_16 (C and 2#00_111111#); end if; end if; end Get_Continuation; -- Start of processing for Decode begin Iptr := Item'First; -- Skip BOM at start if Item'Length >= 3 and then Item (Iptr .. Iptr + 2) = BOM_8 then Iptr := Iptr + 3; -- Error if bad BOM elsif Item'Length >= 2 and then (Item (Iptr .. Iptr + 1) = BOM_16BE or else Item (Iptr .. Iptr + 1) = BOM_16LE) then Raise_Encoding_Error (Iptr); end if; while Iptr <= Item'Last loop C := To_Unsigned_8 (Item (Iptr)); Iptr := Iptr + 1; -- Codes in the range 16#00# - 16#7F# are represented as -- 0xxxxxxx if C <= 16#7F# then R := Unsigned_16 (C); -- No initial code can be of the form 10xxxxxx. Such codes are used -- only for continuations. elsif C <= 2#10_111111# then Raise_Encoding_Error (Iptr - 1); -- Codes in the range 16#80# - 16#7FF# are represented as -- 110yyyxx 10xxxxxx elsif C <= 2#110_11111# then R := Unsigned_16 (C and 2#000_11111#); Get_Continuation; -- Codes in the range 16#800# - 16#FFFF# are represented as -- 1110yyyy 10yyyyxx 10xxxxxx elsif C <= 2#1110_1111# then R := Unsigned_16 (C and 2#0000_1111#); Get_Continuation; Get_Continuation; -- Codes in the range 16#10000# - 16#10FFFF# are represented as -- 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx -- Such codes are out of range for Wide_String output else Raise_Encoding_Error (Iptr - 1); end if; Len := Len + 1; Result (Len) := Wide_Character'Val (R); end loop; return Result (1 .. Len); end Decode; -- Decode UTF-16 input to Wide_String function Decode (Item : UTF_16_Wide_String) return Wide_String is Result : Wide_String (1 .. Item'Length); -- Result is same length as input (possibly minus 1 if BOM present) Len : Natural := 0; -- Length of result Iptr : Natural; -- Index of next Item element C : Unsigned_16; begin -- Skip UTF-16 BOM at start Iptr := Item'First; if Item'Length > 0 and then Item (Iptr) = BOM_16 (1) then Iptr := Iptr + 1; end if; -- Loop through input characters while Iptr <= Item'Last loop C := To_Unsigned_16 (Item (Iptr)); Iptr := Iptr + 1; -- Codes in the range 16#0000#..16#D7FF# or 16#E000#..16#FFFD# -- represent their own value. if C <= 16#D7FF# or else C in 16#E000# .. 16#FFFD# then Len := Len + 1; Result (Len) := Wide_Character'Val (C); -- Codes in the range 16#D800#..16#DBFF# represent the first of the -- two surrogates used to encode the range 16#01_000#..16#10_FFFF". -- Such codes are out of range for 16-bit output. -- The case of input in the range 16#DC00#..16#DFFF# must never -- occur, since it means we have a second surrogate character with -- no corresponding first surrogate. -- Codes in the range 16#FFFE# .. 16#FFFF# are also invalid since -- they conflict with codes used for BOM values. -- Thus all remaining codes are invalid else Raise_Encoding_Error (Iptr - 1); end if; end loop; return Result (1 .. Len); end Decode; ------------ -- Encode -- ------------ -- Encode Wide_String in UTF-8, UTF-16BE or UTF-16LE function Encode (Item : Wide_String; Output_Scheme : Encoding_Scheme; Output_BOM : Boolean := False) return UTF_String is begin -- Case of UTF_8 if Output_Scheme = UTF_8 then return Encode (Item, Output_BOM); -- Case of UTF_16LE or UTF_16BE, use UTF-16 intermediary else return From_UTF_16 (UTF_16_Wide_String'(Encode (Item)), Output_Scheme, Output_BOM); end if; end Encode; -- Encode Wide_String in UTF-8 function Encode (Item : Wide_String; Output_BOM : Boolean := False) return UTF_8_String is Result : UTF_8_String (1 .. 3 * Item'Length + 3); -- Worst case is three bytes per input byte + space for BOM Len : Natural; -- Number of output codes stored in Result C : Unsigned_16; -- Single input character procedure Store (C : Unsigned_16); pragma Inline (Store); -- Store one output code, C is in the range 0 .. 255 ----------- -- Store -- ----------- procedure Store (C : Unsigned_16) is begin Len := Len + 1; Result (Len) := Character'Val (C); end Store; -- Start of processing for UTF8_Encode begin -- Output BOM if required if Output_BOM then Result (1 .. 3) := BOM_8; Len := 3; else Len := 0; end if; -- Loop through characters of input for J in Item'Range loop C := To_Unsigned_16 (Item (J)); -- Codes in the range 16#00# - 16#7F# are represented as -- 0xxxxxxx if C <= 16#7F# then Store (C); -- Codes in the range 16#80# - 16#7FF# are represented as -- 110yyyxx 10xxxxxx elsif C <= 16#7FF# then Store (2#110_00000# or Shift_Right (C, 6)); Store (2#10_000000# or (C and 2#00_111111#)); -- Codes in the range 16#800# - 16#FFFF# are represented as -- 1110yyyy 10yyyyxx 10xxxxxx else Store (2#1110_0000# or Shift_Right (C, 12)); Store (2#10_000000# or Shift_Right (C and 2#111111_000000#, 6)); Store (2#10_000000# or (C and 2#00_111111#)); end if; end loop; return Result (1 .. Len); end Encode; -- Encode Wide_String in UTF-16 function Encode (Item : Wide_String; Output_BOM : Boolean := False) return UTF_16_Wide_String is Result : UTF_16_Wide_String (1 .. Item'Length + Boolean'Pos (Output_BOM)); -- Output is same length as input + possible BOM Len : Integer; -- Length of output string C : Unsigned_16; begin -- Output BOM if required if Output_BOM then Result (1) := BOM_16 (1); Len := 1; else Len := 0; end if; -- Loop through input characters encoding them for Iptr in Item'Range loop C := To_Unsigned_16 (Item (Iptr)); -- Codes in the range 16#0000#..16#D7FF# or 16#E000#..16#FFFD# are -- output unchanged. if C <= 16#D7FF# or else C in 16#E000# .. 16#FFFD# then Len := Len + 1; Result (Len) := Wide_Character'Val (C); -- Codes in the range 16#D800#..16#DFFF# should never appear in the -- input, since no valid Unicode characters are in this range (which -- would conflict with the UTF-16 surrogate encodings). Similarly -- codes in the range 16#FFFE#..16#FFFF conflict with BOM codes. -- Thus all remaining codes are illegal. else Raise_Encoding_Error (Iptr); end if; end loop; return Result; end Encode; end Ada.Strings.UTF_Encoding.Wide_Strings;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2020 onox <denkpadje@gmail.com> -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. with Orka.Behaviors; with Orka.Cameras; with Orka.Rendering.Programs.Modules; with Orka.Resources.Locations; private with GL.Low_Level.Enums; private with Orka.Rendering.Programs.Uniforms; package Orka.Features.Atmosphere.Rendering is pragma Preelaborate; Sun_Radius_Meter : constant := 695_700_000.0; type Model_Parameters is record Semi_Major_Axis : Cameras.Distance; Flattening : Cameras.Distance := 0.0; Axial_Tilt : Cameras.Angle; Star_Radius : Cameras.Distance := Sun_Radius_Meter; end record; -- Semi-major axis and the axial tilt are only used if flattening > 0.0 type Atmosphere is tagged limited private; function Create_Atmosphere (Data : aliased Model_Data; Location : Resources.Locations.Location_Ptr; Parameters : Model_Parameters := (others => <>)) return Atmosphere; function Shader_Module (Object : Atmosphere) return Orka.Rendering.Programs.Modules.Module; -- Return the shader module for use by other features like terrain -- rendering procedure Render (Object : in out Atmosphere; Camera : Cameras.Camera_Ptr; Planet : Behaviors.Behavior_Ptr; Star : Behaviors.Behavior_Ptr); -- Render the atmosphere on the far plane -- -- This procedure assumes that the precomputed textures have been -- binded with procedure Orka.Features.Atmosphere.Bind_Textures. private package LE renames GL.Low_Level.Enums; package Programs renames Orka.Rendering.Programs; type Atmosphere is tagged limited record Program : Programs.Program; Module : Programs.Modules.Module; Parameters : Model_Parameters; Bottom_Radius : GL.Types.Double; Distance_Scale : GL.Types.Double; Uniform_Ground_Hack : Programs.Uniforms.Uniform (LE.Bool_Type); Uniform_Camera_Offset : Programs.Uniforms.Uniform (LE.Single_Vec4); Uniform_Camera_Pos : Programs.Uniforms.Uniform (LE.Single_Vec4); Uniform_Planet_Pos : Programs.Uniforms.Uniform (LE.Single_Vec4); Uniform_Star_Dir : Programs.Uniforms.Uniform (LE.Single_Vec4); Uniform_Star_Size : Programs.Uniforms.Uniform (LE.Single_Type); Uniform_Sun_Dir : Programs.Uniforms.Uniform (LE.Single_Vec4); Uniform_View : Programs.Uniforms.Uniform (LE.Single_Matrix4); Uniform_Proj : Programs.Uniforms.Uniform (LE.Single_Matrix4); end record; end Orka.Features.Atmosphere.Rendering;
----------------------------------------------------------------------- -- AWA.Comments.Models -- AWA.Comments.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Objects.Enums; with Util.Beans.Basic.Lists; with ADO.Audits; with AWA.Users.Models; with Util.Beans.Methods; pragma Warnings (On); package AWA.Comments.Models is pragma Style_Checks ("-mr"); -- -------------------- -- The format type defines the message format type. -- -------------------- type Format_Type is (FORMAT_TEXT, FORMAT_WIKI, FORMAT_HTML); for Format_Type use (FORMAT_TEXT => 0, FORMAT_WIKI => 1, FORMAT_HTML => 2); package Format_Type_Objects is new Util.Beans.Objects.Enums (Format_Type); type Nullable_Format_Type is record Is_Null : Boolean := True; Value : Format_Type; end record; -- -------------------- -- The status type defines whether the comment is visible or not. -- The comment can be put in the COMMENT_WAITING state so that -- it is not immediately visible. It must be put in the COMMENT_PUBLISHED -- state to be visible. -- -------------------- type Status_Type is (COMMENT_PUBLISHED, COMMENT_WAITING, COMMENT_SPAM, COMMENT_BLOCKED, COMMENT_ARCHIVED); for Status_Type use (COMMENT_PUBLISHED => 0, COMMENT_WAITING => 1, COMMENT_SPAM => 2, COMMENT_BLOCKED => 3, COMMENT_ARCHIVED => 4); package Status_Type_Objects is new Util.Beans.Objects.Enums (Status_Type); type Nullable_Status_Type is record Is_Null : Boolean := True; Value : Status_Type; end record; type Comment_Ref is new ADO.Objects.Object_Ref with null record; -- -------------------- -- The Comment table records a user comment associated with a database entity. -- The comment can be associated with any other database record. -- -------------------- -- Create an object key for Comment. function Comment_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Comment from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Comment_Key (Id : in String) return ADO.Objects.Object_Key; Null_Comment : constant Comment_Ref; function "=" (Left, Right : Comment_Ref'Class) return Boolean; -- Set the comment publication date procedure Set_Create_Date (Object : in out Comment_Ref; Value : in Ada.Calendar.Time); -- Get the comment publication date function Get_Create_Date (Object : in Comment_Ref) return Ada.Calendar.Time; -- Set the comment message. procedure Set_Message (Object : in out Comment_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Message (Object : in out Comment_Ref; Value : in String); -- Get the comment message. function Get_Message (Object : in Comment_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Message (Object : in Comment_Ref) return String; -- Set the entity identifier to which this comment is associated procedure Set_Entity_Id (Object : in out Comment_Ref; Value : in ADO.Identifier); -- Get the entity identifier to which this comment is associated function Get_Entity_Id (Object : in Comment_Ref) return ADO.Identifier; -- Set the comment identifier procedure Set_Id (Object : in out Comment_Ref; Value : in ADO.Identifier); -- Get the comment identifier function Get_Id (Object : in Comment_Ref) return ADO.Identifier; -- Get the optimistic lock version. function Get_Version (Object : in Comment_Ref) return Integer; -- Set the entity type that identifies the table to which the comment is associated. procedure Set_Entity_Type (Object : in out Comment_Ref; Value : in ADO.Entity_Type); -- Get the entity type that identifies the table to which the comment is associated. function Get_Entity_Type (Object : in Comment_Ref) return ADO.Entity_Type; -- Set the comment status to decide whether the comment is visible (published) or not. procedure Set_Status (Object : in out Comment_Ref; Value : in AWA.Comments.Models.Status_Type); -- Get the comment status to decide whether the comment is visible (published) or not. function Get_Status (Object : in Comment_Ref) return AWA.Comments.Models.Status_Type; -- Set the comment format type. procedure Set_Format (Object : in out Comment_Ref; Value : in AWA.Comments.Models.Format_Type); -- Get the comment format type. function Get_Format (Object : in Comment_Ref) return AWA.Comments.Models.Format_Type; -- procedure Set_Author (Object : in out Comment_Ref; Value : in AWA.Users.Models.User_Ref'Class); -- function Get_Author (Object : in Comment_Ref) return AWA.Users.Models.User_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Comment_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Comment_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Comment_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Comment_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Comment_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Comment_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition COMMENT_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Comment_Ref); -- Copy of the object. procedure Copy (Object : in Comment_Ref; Into : in out Comment_Ref); -- -------------------- -- The comment information. -- -------------------- type Comment_Info is new Util.Beans.Basic.Bean with record -- the comment identifier. Id : ADO.Identifier; -- the comment author's name. Author : Ada.Strings.Unbounded.Unbounded_String; -- the comment author's email. Email : Ada.Strings.Unbounded.Unbounded_String; -- the comment date. Date : Ada.Calendar.Time; -- the comment format type. Format : AWA.Comments.Models.Format_Type; -- the comment text. Comment : Ada.Strings.Unbounded.Unbounded_String; -- the comment status. Status : AWA.Comments.Models.Status_Type; end record; -- Get the bean attribute identified by the name. overriding function Get_Value (From : in Comment_Info; Name : in String) return Util.Beans.Objects.Object; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Comment_Info; Name : in String; Value : in Util.Beans.Objects.Object); package Comment_Info_Beans is new Util.Beans.Basic.Lists (Element_Type => Comment_Info); package Comment_Info_Vectors renames Comment_Info_Beans.Vectors; subtype Comment_Info_List_Bean is Comment_Info_Beans.List_Bean; type Comment_Info_List_Bean_Access is access all Comment_Info_List_Bean; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Comment_Info_List_Bean'Class; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); subtype Comment_Info_Vector is Comment_Info_Vectors.Vector; -- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>. procedure List (Object : in out Comment_Info_Vector; Session : in out ADO.Sessions.Session'Class; Context : in out ADO.Queries.Context'Class); Query_Comment_List : constant ADO.Queries.Query_Definition_Access; Query_All_Comment_List : constant ADO.Queries.Query_Definition_Access; type Comment_Bean is abstract new AWA.Comments.Models.Comment_Ref and Util.Beans.Basic.Bean and Util.Beans.Methods.Method_Bean with null record; -- This bean provides some methods that can be used in a Method_Expression. overriding function Get_Method_Bindings (From : in Comment_Bean) return Util.Beans.Methods.Method_Binding_Array_Access; -- Set the bean attribute identified by the name. overriding procedure Set_Value (Item : in out Comment_Bean; Name : in String; Value : in Util.Beans.Objects.Object); procedure Create (Bean : in out Comment_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Delete (Bean : in out Comment_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Save (Bean : in out Comment_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; procedure Publish (Bean : in out Comment_Bean; Outcome : in out Ada.Strings.Unbounded.Unbounded_String) is abstract; private COMMENT_NAME : aliased constant String := "awa_comment"; COL_0_1_NAME : aliased constant String := "create_date"; COL_1_1_NAME : aliased constant String := "message"; COL_2_1_NAME : aliased constant String := "entity_id"; COL_3_1_NAME : aliased constant String := "id"; COL_4_1_NAME : aliased constant String := "version"; COL_5_1_NAME : aliased constant String := "entity_type"; COL_6_1_NAME : aliased constant String := "status"; COL_7_1_NAME : aliased constant String := "format"; COL_8_1_NAME : aliased constant String := "author_id"; COMMENT_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 9, Table => COMMENT_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access, 3 => COL_2_1_NAME'Access, 4 => COL_3_1_NAME'Access, 5 => COL_4_1_NAME'Access, 6 => COL_5_1_NAME'Access, 7 => COL_6_1_NAME'Access, 8 => COL_7_1_NAME'Access, 9 => COL_8_1_NAME'Access) ); COMMENT_TABLE : constant ADO.Schemas.Class_Mapping_Access := COMMENT_DEF'Access; COMMENT_AUDIT_DEF : aliased constant ADO.Audits.Auditable_Mapping := (Count => 3, Of_Class => COMMENT_DEF'Access, Members => ( 1 => 1, 2 => 6, 3 => 7) ); COMMENT_AUDIT_TABLE : constant ADO.Audits.Auditable_Mapping_Access := COMMENT_AUDIT_DEF'Access; Null_Comment : constant Comment_Ref := Comment_Ref'(ADO.Objects.Object_Ref with null record); type Comment_Impl is new ADO.Audits.Auditable_Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => COMMENT_DEF'Access, With_Audit => COMMENT_AUDIT_DEF'Access) with record Create_Date : Ada.Calendar.Time; Message : Ada.Strings.Unbounded.Unbounded_String; Entity_Id : ADO.Identifier; Version : Integer; Entity_Type : ADO.Entity_Type; Status : AWA.Comments.Models.Status_Type; Format : AWA.Comments.Models.Format_Type; Author : AWA.Users.Models.User_Ref; end record; type Comment_Access is access all Comment_Impl; overriding procedure Destroy (Object : access Comment_Impl); overriding procedure Find (Object : in out Comment_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Comment_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Comment_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Comment_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Comment_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Comment_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Comment_Ref'Class; Impl : out Comment_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "comment-queries.xml", Sha1 => "80302F51E2EC9855EFAFB43954D724A697C1F8E6"); package Def_Commentinfo_Comment_List is new ADO.Queries.Loaders.Query (Name => "comment-list", File => File_1.File'Access); Query_Comment_List : constant ADO.Queries.Query_Definition_Access := Def_Commentinfo_Comment_List.Query'Access; package Def_Commentinfo_All_Comment_List is new ADO.Queries.Loaders.Query (Name => "all-comment-list", File => File_1.File'Access); Query_All_Comment_List : constant ADO.Queries.Query_Definition_Access := Def_Commentinfo_All_Comment_List.Query'Access; end AWA.Comments.Models;
-- This file is generated by SWIG. Please do *not* modify by hand. -- with gmp_c.a_a_mpz_struct; with Interfaces.C; package gmp_c.mpz_ptr is -- Item -- subtype Item is gmp_c.a_a_mpz_struct.Pointer; -- Items -- type Items is array (Interfaces.C.size_t range <>) of aliased gmp_c.mpz_ptr.Item; -- Pointer -- type Pointer is access all gmp_c.mpz_ptr.Item; -- Pointers -- type Pointers is array (Interfaces.C.size_t range <>) of aliased gmp_c.mpz_ptr.Pointer; -- Pointer_Pointer -- type Pointer_Pointer is access all gmp_c.mpz_ptr.Pointer; end gmp_c.mpz_ptr;
-------------------------------------------------------------------------------- -- Fichier : foret.ads -- Auteur : MOUDDENE Hamza & CAZES Noa -- Objectif : Spécification du module Ensemble -- Crée : Dimanche Nov 10 2019 -------------------------------------------------------------------------------- generic type T_Element is private; -- Type des éléments de l'ensemble. package Ensemble is type T_Ensemble is private; ----------------------------------Constuctor---------------------------------- -- Initilaiser un ensemble. L'ensemble est vide. -- -- Param Ensemble : Ensembe qu'on va initialiser. procedure Initialiser (Ensemble : out T_Ensemble) with Post => Est_Vide (Ensemble); -- Copier un ensemble dans un autre. -- -- Param E1 : E1 dont on va lui copier un deuxième ensemble. -- Param E2 : E2 l'ensemble copié dans E1. procedure Copy (E1 : in out T_Ensemble; E2 : in T_Ensemble); -- Ajouter l'élément à l'ensemble. procedure Ajouter (Ensemble : in out T_Ensemble; Element : in T_Element) with Pre => not(Est_Present (Ensemble, Element)), Post => Est_Present (Ensemble, Element); -----------------------------------Getters---------------------------------- -- Nom : Get_Element -- Sémantique : Obtenir le noeud du pointeur. -- Type_De_Retour : T_Element est la valeur du pointeur. -- Paramètres -- E : E que l'on va parcourir. function Get_Element (E : in T_Ensemble) return T_Element; -- Nom : Get_Next -- Sémantique : Obtenir le pointeur suivant. -- Type_De_Retour : T_Ensemble : Est le pointeur sur la case suivante. -- Paramètre : -- E -- L'ensemble qu'on va parcourir. function Get_Next (E : in T_Ensemble) return T_Ensemble; -----------------------------------Setters---------------------------------- -- Nom : Set_Element -- Sémantique : Changer le noeud du pointeur. -- Paramètres -- E : E que l'on va parcourir. -- Element : L'element qu'on va mettre dans Element. procedure Set_Element (E : in T_Ensemble; Element : in T_Element); -- Nom : Set_Next -- Sémantique : Changer le pointeur suivant. -- Paramètre : -- E -- L'ensemble qu'on va parcourir. -- Next -- Le pointeur suivant procedure Set_Next (E : in T_Ensemble; Next : in T_Ensemble); ---------------------------------------------------------------------------- -- Détruire un ensemble (libérer les ressources qu’il utilise). procedure Detruire (Ensemble : in out T_Ensemble) with Post => Est_Vide (Ensemble); -- Est-ce que l'ensemble est vide ? function Est_Vide (Ensemble : in T_Ensemble) return Boolean; -- Obtenir la taille d'un ensemble ? function Taille (Ensemble : in T_Ensemble) return Integer; -- L'élément est-il présent dans l'ensemble. function Est_Present (Ensemble : in T_Ensemble; Element : in T_Element) return Boolean; -- Nom : Edit_Set -- Sémantique : Modifier un element de l'ensemble. -- Paramètre : -- Ensemble : L'ensemble qu'on va parcourir. -- Old_Element : L'element qu'on va changer. -- New_Element : L'element qu'on va mettre en place. procedure Edit_Set (Ensemble : in T_Ensemble; Old_Element, New_Element : in T_Element); -- Nom : Supprimer -- Sémantique : Supprimer un element de l'ensemble. -- Paramètre : -- Ensemble : L'ensemble qu'on va parcourir. -- Ab : L'arbre avant la modification. procedure Supprimer (Ensemble : in out T_Ensemble; Element : in T_Element) with Pre => not Est_Vide (Ensemble) and Est_Present (Ensemble, Element), Post => not(Est_Present (Ensemble, Element)); -- Appliquer une opération sur les éléments de l'ensemble. generic with procedure Afficher_Elt (Un_Element: in T_Element); procedure Afficher_Ensemble (Ensemble : in T_Ensemble); private type T_Cellule; -- T_Ensemble est un pointeur sur T_Cellule. type T_Ensemble is access T_Cellule; type T_Cellule is record Element: T_Element; -- la valeur de la cellule. Suivant: T_Ensemble; -- un pointeur sur la cellule suivante. end record; end Ensemble;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; procedure Sum is subtype Based_From_2 is Integer range 2 .. 4; type Range_n_Based is array (Positive range <>) of Integer; Prime_Number : Range_n_Based(Based_From_2) := (2, 3, 5); function Sum_Array (A : Range_n_Based) return Integer is Result : Integer := 0; begin for Index in A'range loop Result := Result + A (Index); end loop; return Result; end Sum_Array; procedure Sum_Array_in_out (A : in Range_n_Based; Result : in out Integer) is begin Result := 0; for Index in A'range loop Result := Result + A (Index); end loop; end Sum_Array_in_out; procedure Sum_Array_out (A : in Range_n_Based; Result : out Integer) is tmp : Integer := 0; begin for Index in A'range loop tmp := tmp + A (Index); end loop; Result := tmp; end Sum_Array_out; procedure Put_Line (x : Integer) is begin Put (x); New_Line; end Put_Line; Result : Integer := 0; begin Put_Line (Sum_Array (Prime_Number)); Sum_Array_in_out (Prime_Number, Result); Put_Line (Result); Sum_Array_out (Prime_Number, Result); Put_Line (Result); end;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A U N I T . R E P O R T E R . X M L -- -- -- -- B o d y -- -- -- -- -- -- Copyright (C) 2000-2009, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- GNAT is maintained by AdaCore (http://www.adacore.com) -- -- -- ------------------------------------------------------------------------------ with Util.Strings; with Util.Strings.Transforms; with AUnit.Time_Measure; -- Very simple reporter to console package body Util.Tests.Reporter is use AUnit.Test_Results; use type AUnit.Message_String; use type AUnit.Time_Measure.Time; use Ada.Text_IO; procedure Print_Summary (R : in out Result'Class); procedure Dump_Result_List (File : in Ada.Text_IO.File_Type; L : in Result_Lists.List); -- List failed assertions -- procedure Put_Measure is new Gen_Put_Measure; -- Output elapsed time procedure Report_Test (File : in Ada.Text_IO.File_Type; Test : in Test_Result); -- Report a single assertion failure or unexpected exception procedure Put (File : in Ada.Text_IO.File_Type; I : in Integer); procedure Put (File : in Ada.Text_IO.File_Type; T : in AUnit.Time_Measure.Time); procedure Put (File : in Ada.Text_IO.File_Type; I : in Integer) is begin Ada.Text_IO.Put (File, Util.Strings.Image (I)); end Put; procedure Put (File : in Ada.Text_IO.File_Type; T : in AUnit.Time_Measure.Time) is use Ada.Calendar; D : constant Duration := T.Stop - T.Start; S : constant String := Duration'Image (D); Pos : Natural := S'Last; begin while Pos > S'First and S (Pos) = '0' loop Pos := Pos - 1; end loop; if D >= 0.0 then Put (File, S (S'First + 1 .. Pos)); else Put (File, S (S'First .. Pos)); end if; end Put; ---------------------- -- Dump_Result_List -- ---------------------- procedure Dump_Result_List (File : in Ada.Text_IO.File_Type; L : in Result_Lists.List) is use Result_Lists; C : Cursor := First (L); begin -- Note: can't use Iterate because it violates restriction -- No_Implicit_Dynamic_Code while Has_Element (C) loop Report_Test (File, Element (C)); Next (C); end loop; end Dump_Result_List; ------------ -- Report -- ------------ procedure Report (Engine : in XML_Reporter; R : in out Result'Class; Options : in AUnit.Options.AUnit_Options := AUnit.Options.Default_Options) is Output : Ada.Text_IO.File_Type; begin Ada.Text_IO.Create (File => Output, Mode => Ada.Text_IO.Out_File, Name => To_String (Engine.File)); Engine.Report (Output, R); Ada.Text_IO.Close (Output); end Report; procedure Print_Summary (R : in out Result'Class) is S_Count : constant Integer := Integer (Success_Count (R)); F_Count : constant Integer := Integer (Failure_Count (R)); E_Count : constant Integer := Integer (Error_Count (R)); begin New_Line; Put ("Total Tests Run: "); Put (Util.Strings.Image (Integer (Test_Count (R)))); New_Line; Put ("Successful Tests: "); Put (Util.Strings.Image (S_Count)); New_Line; Put ("Failed Assertions: "); Put (Util.Strings.Image (F_Count)); New_Line; Put ("Unexpected Errors: "); Put (Util.Strings.Image (E_Count)); New_Line; end Print_Summary; ------------ -- Report -- ------------ procedure Report (Engine : XML_Reporter; File : in out Ada.Text_IO.File_Type; R : in out Result'Class) is pragma Unreferenced (Engine); begin Put_Line (File, "<?xml version='1.0' encoding='utf-8' ?>"); Put (File, "<TestRun"); if Elapsed (R) /= AUnit.Time_Measure.Null_Time then Put (File, " elapsed='"); Put (File, Elapsed (R)); Put_Line (File, "'>"); else Put_Line (File, ">"); end if; Print_Summary (R); Put_Line (File, " <Statistics>"); Put (File, " <Tests>"); Put (File, Integer (Test_Count (R))); Put_Line (File, "</Tests>"); Put (File, " <FailuresTotal>"); Put (File, Integer (Failure_Count (R)) + Integer (Error_Count (R))); Put_Line (File, "</FailuresTotal>"); Put (File, " <Failures>"); Put (File, Integer (Failure_Count (R))); Put_Line (File, "</Failures>"); Put (File, " <Errors>"); Put (File, Integer (Error_Count (R))); Put_Line (File, "</Errors>"); Put_Line (File, " </Statistics>"); declare S : Result_Lists.List; begin Put_Line (File, " <SuccessfulTests>"); Successes (R, S); Dump_Result_List (File, S); Put_Line (File, " </SuccessfulTests>"); end; Put_Line (File, " <FailedTests>"); declare F : Result_Lists.List; begin Failures (R, F); Dump_Result_List (File, F); end; declare E : Result_Lists.List; begin Errors (R, E); Dump_Result_List (File, E); end; Put_Line (File, " </FailedTests>"); Put_Line (File, "</TestRun>"); end Report; ------------------ -- Report_Error -- ------------------ procedure Report_Test (File : in Ada.Text_IO.File_Type; Test : in Test_Result) is use Util.Strings.Transforms; use type Ada.Calendar.Time; Is_Assert : Boolean; begin Put (File, " <Test"); if Test.Elapsed /= AUnit.Time_Measure.Null_Time then Put (File, " elapsed='"); Put (File, Test.Elapsed); Put_Line (File, "'>"); else Put_Line (File, ">"); end if; Put (File, " <Name>"); Put (File, Escape_Xml (Test.Test_Name.all)); if Test.Routine_Name /= null then Put (File, " : "); Put (File, Escape_Xml (Test.Routine_Name.all)); end if; Put_Line (File, "</Name>"); if Test.Failure /= null or else Test.Error /= null then if Test.Failure /= null then Is_Assert := True; else Is_Assert := False; end if; Put (File, " <FailureType>"); if Is_Assert then Put (File, "Assertion"); else Put (File, "Error"); end if; Put_Line (File, "</FailureType>"); Put (File, " <Message>"); if Is_Assert then Put (File, Escape_Xml (Test.Failure.Message.all)); else Put (File, Test.Error.Exception_Name.all); end if; Put_Line (File, "</Message>"); if Is_Assert then Put_Line (File, " <Location>"); Put (File, " <File>"); Put (File, Escape_Xml (Test.Failure.Source_Name.all)); Put_Line (File, "</File>"); Put (File, " <Line>"); Put (File, Test.Failure.Line); Put_Line (File, "</Line>"); Put_Line (File, " </Location>"); else Put_Line (File, " <Exception>"); Put (File, " <Message>"); Put (File, Test.Error.Exception_Name.all); Put_Line (File, "</Message>"); if Test.Error.Exception_Message /= null then Put (File, " <Information>"); Put (File, Escape_Xml (Test.Error.Exception_Message.all)); Put_Line (File, "</Information>"); end if; if Test.Error.Traceback /= null then Put (File, " <Traceback>"); Put (File, Escape_Xml (Test.Error.Traceback.all)); Put_Line (File, "</Traceback>"); end if; Put_Line (File, " </Exception>"); end if; end if; Put_Line (File, " </Test>"); end Report_Test; end Util.Tests.Reporter;
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 3 4 -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1992-1999 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNAT; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- Handling of packed arrays with Component_Size = 34 package System.Pack_34 is pragma Preelaborate (Pack_34); Bits : constant := 34; type Bits_34 is mod 2 ** Bits; for Bits_34'Size use Bits; function Get_34 (Arr : System.Address; N : Natural) return Bits_34; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. procedure Set_34 (Arr : System.Address; N : Natural; E : Bits_34); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. function GetU_34 (Arr : System.Address; N : Natural) return Bits_34; -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is extracted and returned. This version -- is used when Arr may represent an unaligned address. procedure SetU_34 (Arr : System.Address; N : Natural; E : Bits_34); -- Arr is the address of the packed array, N is the zero-based -- subscript. This element is set to the given value. This version -- is used when Arr may represent an unaligned address end System.Pack_34;
with ARM_Input; package ARM_String is -- -- Ada reference manual formatter (ARM_Form). -- -- This package contains the definition of reading input from a string. -- -- --------------------------------------- -- Copyright 2000, 2011 -- AXE Consultants. All rights reserved. -- P.O. Box 1512, Madison WI 53701 -- E-Mail: randy@rrsoftware.com -- -- ARM_Form is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License version 3 -- as published by the Free Software Foundation. -- -- AXE CONSULTANTS MAKES THIS TOOL AND SOURCE CODE AVAILABLE ON AN "AS IS" -- BASIS AND MAKES NO WARRANTY, EXPRESS OR IMPLIED, AS TO THE ACCURACY, -- CAPABILITY, EFFICIENCY, MERCHANTABILITY, OR FUNCTIONING OF THIS TOOL. -- IN NO EVENT WILL AXE CONSULTANTS BE LIABLE FOR ANY GENERAL, -- CONSEQUENTIAL, INDIRECT, INCIDENTAL, EXEMPLARY, OR SPECIAL DAMAGES, -- EVEN IF AXE CONSULTANTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -- DAMAGES. -- -- A copy of the GNU General Public License is available in the file -- gpl-3-0.txt in the standard distribution of the ARM_Form tool. -- Otherwise, see <http://www.gnu.org/licenses/>. -- -- If the GPLv3 license is not satisfactory for your needs, a commercial -- use license is available for this tool. Contact Randy at AXE Consultants -- for more information. -- -- --------------------------------------- -- -- Edit History: -- -- 5/15/00 - RLB - Created package. -- 10/18/11 - RLB - Changed to GPLv3 license. type String_Input_Type is new ARM_Input.Input_Type with private; procedure Open (Input_Object : in out String_Input_Type; Text : in String; Text_Name : in String); -- Open an input object for a string (Text), with a name of Text_Name. -- (The name is used for error messages). procedure Close (Input_Object : in out String_Input_Type); -- Close the input object (entity). -- May propagate exceptions from the underlying implementation -- (that is, I/O exceptions). procedure Get_Char (Input_Object : in out String_Input_Type; Char : out Character); -- We represent end of line by Ascii.LF. -- Raises: End_Error when the end of file is reached. -- Not_Valid_Error if Input_Object is not valid (open). procedure Replace_Char (Input_Object : in out String_Input_Type); -- Replaces the last character read (with Get_Char); the next call -- to Get_Char will return it. -- Raises: Not_Valid_Error if Input_Object is not valid (open). function Line_String (Input_Object : in String_Input_Type) return String; -- Returns a string representing the line number and entity. -- Usually used in error messages. -- Raises: Not_Valid_Error if Input_Object is not valid (open). procedure Start_Recording (Input_Object : in out String_Input_Type); -- Start recording all characters read into a local buffer. -- Use this when text needs to be formatted into the output -- file *and* be saved for future use. -- Raises: Not_Valid_Error if Input_Object is not valid (open). procedure Stop_Recording_and_Read_Result (Input_Object : in out String_Input_Type; Result : out String; Len : out Natural); -- Stop recording characters read. Put the result into Result, -- and the number of characters written into Len. -- Raises: Not_Valid_Error if Input_Object is not valid (open). private type String_Input_Type is new ARM_Input.Input_Type with record Is_Valid : Boolean := False; Line_Counter : Natural := 0; Buffer : String(1..4000); Buffer_Len : Natural := 0; Buffer_Index : Natural := 0; -- Last character read from buffer. -- For recording: Recording : Boolean := False; Recording_Start : Natural := 0; -- First character of recorded section. -- Name: Name : String(1..120); Name_Len : Natural; end record; end ARM_String;
----------------------------------------------------------------------- -- util-encoders-hmac-sha1 -- Compute HMAC-SHA256 authentication code -- Copyright (C) 2017, 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Encoders.Base16; with Util.Encoders.Base64; package body Util.Encoders.HMAC.SHA256 is -- ------------------------------ -- Sign the data string with the key and return the HMAC-SHA256 code in binary. -- ------------------------------ function Sign (Key : in String; Data : in String) return Util.Encoders.SHA256.Hash_Array is Ctx : Context; Result : Util.Encoders.SHA256.Hash_Array; begin Set_Key (Ctx, Key); Update (Ctx, Data); Finish (Ctx, Result); return Result; end Sign; -- ------------------------------ -- Sign the data array with the key and return the HMAC-SHA256 code in the result. -- ------------------------------ procedure Sign (Key : in Ada.Streams.Stream_Element_Array; Data : in Ada.Streams.Stream_Element_Array; Result : out Util.Encoders.SHA256.Hash_Array) is Ctx : Context; begin Set_Key (Ctx, Key); Update (Ctx, Data); Finish (Ctx, Result); end Sign; procedure Sign (Key : in Secret_Key; Data : in Ada.Streams.Stream_Element_Array; Result : out Util.Encoders.SHA256.Hash_Array) is begin Sign (Key.Secret, Data, Result); end Sign; -- ------------------------------ -- Sign the data string with the key and return the HMAC-SHA256 code as hexadecimal string. -- ------------------------------ function Sign (Key : in String; Data : in String) return Util.Encoders.SHA256.Digest is Ctx : Context; Result : Util.Encoders.SHA256.Digest; begin Set_Key (Ctx, Key); Update (Ctx, Data); Finish (Ctx, Result); return Result; end Sign; -- ------------------------------ -- Sign the data string with the key and return the HMAC-SHA256 code as base64 string. -- When <b>URL</b> is True, use the base64 URL alphabet to encode in base64. -- ------------------------------ function Sign_Base64 (Key : in String; Data : in String; URL : in Boolean := False) return Util.Encoders.SHA256.Base64_Digest is Ctx : Context; Result : Util.Encoders.SHA256.Base64_Digest; begin Set_Key (Ctx, Key); Update (Ctx, Data); Finish_Base64 (Ctx, Result, URL); return Result; end Sign_Base64; -- ------------------------------ -- Set the hmac private key. The key must be set before calling any <b>Update</b> -- procedure. -- ------------------------------ procedure Set_Key (E : in out Context; Key : in String) is Buf : Ada.Streams.Stream_Element_Array (1 .. Key'Length); for Buf'Address use Key'Address; pragma Import (Ada, Buf); begin Set_Key (E, Buf); end Set_Key; IPAD : constant Ada.Streams.Stream_Element := 16#36#; OPAD : constant Ada.Streams.Stream_Element := 16#5c#; -- ------------------------------ -- Set the hmac private key. The key must be set before calling any <b>Update</b> -- procedure. -- ------------------------------ procedure Set_Key (E : in out Context; Key : in Ada.Streams.Stream_Element_Array) is begin -- Reduce the key if Key'Length > 64 then Util.Encoders.SHA256.Update (E.SHA, Key); Util.Encoders.SHA256.Finish (E.SHA, E.Key (0 .. 31)); E.Key_Len := 31; else E.Key_Len := Key'Length - 1; E.Key (0 .. E.Key_Len) := Key; end if; -- Hash the key in the SHA256 context. declare Block : Ada.Streams.Stream_Element_Array (0 .. 63); begin for I in 0 .. E.Key_Len loop Block (I) := IPAD xor E.Key (I); end loop; for I in E.Key_Len + 1 .. 63 loop Block (I) := IPAD; end loop; Util.Encoders.SHA256.Update (E.SHA, Block); end; end Set_Key; procedure Set_Key (E : in out Context; Key : in Secret_Key) is begin Set_Key (E, Key.Secret); end Set_Key; -- ------------------------------ -- Update the hash with the string. -- ------------------------------ procedure Update (E : in out Context; S : in String) is begin Util.Encoders.SHA256.Update (E.SHA, S); end Update; -- ------------------------------ -- Update the hash with the string. -- ------------------------------ procedure Update (E : in out Context; S : in Ada.Streams.Stream_Element_Array) is begin Util.Encoders.SHA256.Update (E.SHA, S); end Update; -- ------------------------------ -- Update the hash with the secret key. -- ------------------------------ procedure Update (E : in out Context; S : in Secret_Key) is begin Update (E, S.Secret); end Update; -- ------------------------------ -- Computes the HMAC-SHA256 with the private key and the data collected by -- the <b>Update</b> procedures. Returns the raw binary hash in <b>Hash</b>. -- ------------------------------ procedure Finish (E : in out Context; Hash : out Util.Encoders.SHA256.Hash_Array) is begin Util.Encoders.SHA256.Finish (E.SHA, Hash); -- Hash the key in the SHA256 context. declare Block : Ada.Streams.Stream_Element_Array (0 .. 63); begin for I in 0 .. E.Key_Len loop Block (I) := OPAD xor E.Key (I); end loop; if E.Key_Len < 63 then for I in E.Key_Len + 1 .. 63 loop Block (I) := OPAD; end loop; end if; Util.Encoders.SHA256.Update (E.SHA, Block); end; Util.Encoders.SHA256.Update (E.SHA, Hash); Util.Encoders.SHA256.Finish (E.SHA, Hash); end Finish; -- ------------------------------ -- Computes the HMAC-SHA256 with the private key and the data collected by -- the <b>Update</b> procedures. Returns the hexadecimal hash in <b>Hash</b>. -- ------------------------------ procedure Finish (E : in out Context; Hash : out Util.Encoders.SHA256.Digest) is H : Util.Encoders.SHA256.Hash_Array; B : Util.Encoders.Base16.Encoder; begin Finish (E, H); B.Convert (H, Hash); end Finish; -- ------------------------------ -- Computes the HMAC-SHA256 with the private key and the data collected by -- the <b>Update</b> procedures. Returns the base64 hash in <b>Hash</b>. -- When <b>URL</b> is True, use the base64 URL alphabet to encode in base64. -- ------------------------------ procedure Finish_Base64 (E : in out Context; Hash : out Util.Encoders.SHA256.Base64_Digest; URL : in Boolean := False) is H : Util.Encoders.SHA256.Hash_Array; B : Util.Encoders.Base64.Encoder; begin Finish (E, H); B.Set_URL_Mode (URL); B.Convert (H, Hash); end Finish_Base64; -- Initialize the SHA-1 context. overriding procedure Initialize (E : in out Context) is begin null; end Initialize; end Util.Encoders.HMAC.SHA256;
-- This spec has been automatically generated from STM32F103.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with System; package STM32_SVD.WWDG is pragma Preelaborate; --------------- -- Registers -- --------------- subtype CR_T_Field is STM32_SVD.UInt7; subtype CR_WDGA_Field is STM32_SVD.Bit; -- Control register (WWDG_CR) type CR_Register is record -- 7-bit counter (MSB to LSB) T : CR_T_Field := 16#7F#; -- Activation bit WDGA : CR_WDGA_Field := 16#0#; -- unspecified Reserved_8_31 : STM32_SVD.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record T at 0 range 0 .. 6; WDGA at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype CFR_W_Field is STM32_SVD.UInt7; subtype CFR_WDGTB_Field is STM32_SVD.UInt2; subtype CFR_EWI_Field is STM32_SVD.Bit; -- Configuration register (WWDG_CFR) type CFR_Register is record -- 7-bit window value W : CFR_W_Field := 16#7F#; -- Timer Base WDGTB : CFR_WDGTB_Field := 16#0#; -- Early Wakeup Interrupt EWI : CFR_EWI_Field := 16#0#; -- unspecified Reserved_10_31 : STM32_SVD.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CFR_Register use record W at 0 range 0 .. 6; WDGTB at 0 range 7 .. 8; EWI at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype SR_EWI_Field is STM32_SVD.Bit; -- Status register (WWDG_SR) type SR_Register is record -- Early Wakeup Interrupt EWI : SR_EWI_Field := 16#0#; -- unspecified Reserved_1_31 : STM32_SVD.UInt31 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for SR_Register use record EWI at 0 range 0 .. 0; Reserved_1_31 at 0 range 1 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Window watchdog type WWDG_Peripheral is record -- Control register (WWDG_CR) CR : aliased CR_Register; -- Configuration register (WWDG_CFR) CFR : aliased CFR_Register; -- Status register (WWDG_SR) SR : aliased SR_Register; end record with Volatile; for WWDG_Peripheral use record CR at 16#0# range 0 .. 31; CFR at 16#4# range 0 .. 31; SR at 16#8# range 0 .. 31; end record; -- Window watchdog WWDG_Periph : aliased WWDG_Peripheral with Import, Address => System'To_Address (16#40002C00#); end STM32_SVD.WWDG;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . W I D _ C H A R -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2020, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package contains the routine used for Character'Width package System.Wid_Char is pragma Pure; function Width_Character (Lo, Hi : Character) return Natural; -- Compute Width attribute for non-static type derived from Character. -- The arguments are the low and high bounds for the type. end System.Wid_Char;
------------------------------------------------------------------------------- -- -- -- Coffee Clock -- -- -- -- Copyright (C) 2016-2017 Fabien Chouteau -- -- -- -- Coffee Clock is free software: you can redistribute it and/or -- -- modify it under the terms of the GNU General Public License as -- -- published by the Free Software Foundation, either version 3 of the -- -- License, or (at your option) any later version. -- -- -- -- Coffee Clock is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. -- -- -- -- You should have received a copy of the GNU General Public License -- -- along with We Noise Maker. If not, see <http://www.gnu.org/licenses/>. -- -- -- ------------------------------------------------------------------------------- with Giza.Widget.Button; use Giza.Widget; with Giza.Context; with Giza.Window; with Giza.Events; use Giza.Events; with Giza.Types; use Giza.Types; with Settings_Window; with Clock_Widget; with Date_Widget; with HAL.Real_Time_Clock; package Clock_Window is subtype Parent is Giza.Window.Instance; type Instance is new Parent with private; subtype Class is Instance'Class; type Ref is access all Class; overriding procedure On_Init (This : in out Instance); overriding procedure On_Displayed (This : in out Instance); overriding procedure On_Hidden (This : in out Instance); overriding procedure Draw (This : in out Instance; Ctx : in out Giza.Context.Class; Force : Boolean := False); overriding function On_Position_Event (This : in out Instance; Evt : Position_Event_Ref; Pos : Point_T) return Boolean; procedure Set_Time (This : in out Instance; Time : HAL.Real_Time_Clock.RTC_Time); procedure Set_Date (This : in out Instance; Date : HAL.Real_Time_Clock.RTC_Date); private type Instance is new Parent with record Settings_Btn : aliased Button.Instance; Settings : aliased Settings_Window.Instance; Clock : aliased Clock_Widget.Instance; Date : aliased Date_Widget.Instance (Show_Day_Of_Week => False); end record; end Clock_Window;
----------------------------------------------------------------------- -- awa-storages-services -- Storage service -- Copyright (C) 2012, 2013, 2016, 2018, 2019, 2020 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Util.Log.Loggers; with Util.Strings; with Ada.Directories; with ADO.Objects; with ADO.Queries; with ADO.SQL; with ADO.Statements; with ADO.Sessions; with AWA.Services.Contexts; with AWA.Workspaces.Models; with AWA.Workspaces.Modules; with AWA.Permissions; with AWA.Storages.Stores.Files; package body AWA.Storages.Services is use AWA.Services; Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("AWA.Storages.Services"); -- ------------------------------ -- Get the persistent store that manages the data store identified by <tt>Kind</tt>. -- ------------------------------ function Get_Store (Service : in Storage_Service; Kind : in AWA.Storages.Models.Storage_Type) return AWA.Storages.Stores.Store_Access is begin return Service.Stores (Kind); end Get_Store; -- ------------------------------ -- Initializes the storage service. -- ------------------------------ overriding procedure Initialize (Service : in out Storage_Service; Module : in AWA.Modules.Module'Class) is Root : constant String := Module.Get_Config (Stores.Files.Root_Directory_Parameter.P); Tmp : constant String := Module.Get_Config (Stores.Files.Tmp_Directory_Parameter.P); Size : constant Integer := Module.Get_Config (Stores.Databases.Max_Size_Parameter.P); begin AWA.Modules.Module_Manager (Service).Initialize (Module); Service.Stores (Storages.Models.DATABASE) := Service.Database_Store'Unchecked_Access; Service.Stores (Storages.Models.FILE) := AWA.Storages.Stores.Files.Create_File_Store (Root); Service.Stores (Storages.Models.TMP) := AWA.Storages.Stores.Files.Create_File_Store (Tmp); Service.Database_Store.Tmp := Service.Stores (Storages.Models.TMP); Service.Database_Max_Size := Size; end Initialize; -- ------------------------------ -- Create or save the folder. -- ------------------------------ procedure Save_Folder (Service : in Storage_Service; Folder : in out AWA.Storages.Models.Storage_Folder_Ref'Class) is pragma Unreferenced (Service); Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Workspace : AWA.Workspaces.Models.Workspace_Ref; begin if not Folder.Is_Null then Workspace := AWA.Workspaces.Models.Workspace_Ref (Folder.Get_Workspace); end if; if Workspace.Is_Null then AWA.Workspaces.Modules.Get_Workspace (DB, Ctx, Workspace); Folder.Set_Workspace (Workspace); end if; -- Check that the user has the create folder permission on the given workspace. AWA.Permissions.Check (Permission => ACL_Create_Folder.Permission, Entity => Workspace); Ctx.Start; if not Folder.Is_Inserted then Folder.Set_Create_Date (Ada.Calendar.Clock); Folder.Set_Owner (Ctx.Get_User); end if; Folder.Save (DB); Ctx.Commit; end Save_Folder; -- ------------------------------ -- Load the folder instance identified by the given identifier. -- ------------------------------ procedure Load_Folder (Service : in Storage_Service; Folder : in out AWA.Storages.Models.Storage_Folder_Ref'Class; Id : in ADO.Identifier) is pragma Unreferenced (Service); Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); begin Folder.Load (Session => DB, Id => Id); end Load_Folder; -- ------------------------------ -- Load the storage instance identified by the given identifier. -- ------------------------------ procedure Load_Storage (Service : in Storage_Service; Storage : in out AWA.Storages.Models.Storage_Ref'Class; Id : in ADO.Identifier) is pragma Unreferenced (Service); Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Session := AWA.Services.Contexts.Get_Session (Ctx); begin Storage.Load (Session => DB, Id => Id); end Load_Storage; -- ------------------------------ -- Load the storage instance stored in a folder and identified by a name. -- ------------------------------ procedure Load_Storage (Service : in Storage_Service; Storage : in out AWA.Storages.Models.Storage_Ref'Class; Folder : in ADO.Identifier; Name : in String; Found : out Boolean) is pragma Unreferenced (Service); Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Session := AWA.Services.Contexts.Get_Session (Ctx); Query : ADO.SQL.Query; begin Query.Bind_Param ("folder_id", Folder); Query.Bind_Param ("name", Name); Query.Set_Filter ("folder_id = :folder_id AND name = :name AND original_id IS NULL"); Storage.Find (Session => DB, Query => Query, Found => Found); if not Found then Log.Warn ("Storage file {0} not found in folder {1}", Name, ADO.Identifier'Image (Folder)); end if; end Load_Storage; -- ------------------------------ -- Save the data object contained in the <b>Data</b> part element into the -- target storage represented by <b>Into</b>. -- ------------------------------ procedure Save (Service : in Storage_Service; Into : in out AWA.Storages.Models.Storage_Ref'Class; Data : in ASF.Parts.Part'Class; Storage : in AWA.Storages.Models.Storage_Type) is begin Storage_Service'Class (Service).Save (Into, Data.Get_Local_Filename, Storage); end Save; procedure Save (Service : in Storage_Service; Into : in out AWA.Storages.Models.Storage_Ref'Class; Data : in ASF.Parts.Part'Class) is begin if Data.Get_Size > Service.Database_Max_Size then Storage_Service'Class (Service).Save (Into, Data, Models.FILE); else Storage_Service'Class (Service).Save (Into, Data, Models.DATABASE); end if; end Save; -- ------------------------------ -- Save the file described <b>File</b> in the storage -- object represented by <b>Into</b> and managed by the storage service. -- ------------------------------ procedure Save (Service : in Storage_Service; Into : in out AWA.Storages.Models.Storage_Ref'Class; File : in AWA.Storages.Storage_File; Storage : in AWA.Storages.Models.Storage_Type) is begin Storage_Service'Class (Service).Save (Into, AWA.Storages.Get_Path (File), Storage); end Save; -- ------------------------------ -- Save the file pointed to by the <b>Path</b> string in the storage -- object represented by <b>Into</b> and managed by the storage service. -- ------------------------------ procedure Save (Service : in Storage_Service; Into : in out AWA.Storages.Models.Storage_Ref'Class; Path : in String; Storage : in AWA.Storages.Models.Storage_Type) is use type Stores.Store_Access; Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Workspace : AWA.Workspaces.Models.Workspace_Ref; Store : Stores.Store_Access; Created : Boolean; begin Log.Info ("Save {0} in storage space", Path); Into.Set_Storage (Storage); Store := Storage_Service'Class (Service).Get_Store (Into.Get_Storage); if Store = null then Log.Error ("There is no store for storage {0}", Models.Storage_Type'Image (Storage)); end if; if not Into.Is_Null then Workspace := AWA.Workspaces.Models.Workspace_Ref (Into.Get_Workspace); if Workspace.Is_Null and not Into.Get_Folder.Is_Null then Workspace := AWA.Workspaces.Models.Workspace_Ref (Into.Get_Folder.Get_Workspace); Into.Set_Workspace (Workspace); end if; end if; if Workspace.Is_Null then AWA.Workspaces.Modules.Get_Workspace (DB, Ctx, Workspace); Into.Set_Workspace (Workspace); end if; -- Check that the user has the create storage permission on the given workspace. AWA.Permissions.Check (Permission => ACL_Create_Storage.Permission, Entity => Workspace); Ctx.Start; Created := not Into.Is_Inserted; if Created then Into.Set_Create_Date (Ada.Calendar.Clock); Into.Set_Owner (Ctx.Get_User); end if; Into.Save (DB); Store.Save (DB, Into, Path); Into.Save (DB); -- Notify the listeners. if Created then Storage_Lifecycle.Notify_Create (Service, Into); else Storage_Lifecycle.Notify_Update (Service, Into); end if; Ctx.Commit; end Save; -- ------------------------------ -- Load the storage content identified by <b>From</b> into the blob descriptor <b>Into</b>. -- Raises the <b>NOT_FOUND</b> exception if there is no such storage. -- ------------------------------ procedure Load (Service : in Storage_Service; From : in ADO.Identifier; Name : out Ada.Strings.Unbounded.Unbounded_String; Mime : out Ada.Strings.Unbounded.Unbounded_String; Date : out Ada.Calendar.Time; Into : out ADO.Blob_Ref) is use type AWA.Storages.Models.Storage_Type; use type AWA.Storages.Stores.Store_Access; Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; User : constant ADO.Identifier := Ctx.Get_User_Identifier; DB : ADO.Sessions.Session := AWA.Services.Contexts.Get_Session (Ctx); Query : ADO.Statements.Query_Statement := DB.Create_Statement (Models.Query_Storage_Get_Data); Kind : AWA.Storages.Models.Storage_Type; begin Query.Bind_Param ("store_id", From); Query.Bind_Param ("user_id", User); Query.Execute; if not Query.Has_Elements then Log.Warn ("Storage entity {0} not found", ADO.Identifier'Image (From)); raise ADO.Objects.NOT_FOUND; end if; Mime := Query.Get_Unbounded_String (0); Date := Query.Get_Time (1); Name := Query.Get_Unbounded_String (2); Kind := AWA.Storages.Models.Storage_Type'Val (Query.Get_Integer (4)); if Kind = AWA.Storages.Models.DATABASE then Into := Query.Get_Blob (5); else declare Store : Stores.Store_Access; Storage : AWA.Storages.Models.Storage_Ref; Mode : constant Storage_Type := (if Kind = Models.FILE then Storages.FILE else TMP); File : AWA.Storages.Storage_File (Mode); Found : Boolean; begin Store := Storage_Service'Class (Service).Get_Store (Kind); if Store = null then Log.Error ("There is no store for storage {0}", Models.Storage_Type'Image (Kind)); end if; Storage.Load (DB, From, Found); if not Found then Log.Warn ("Storage entity {0} not found", ADO.Identifier'Image (From)); raise ADO.Objects.NOT_FOUND; end if; Store.Load (DB, Storage, File); Into := ADO.Create_Blob (AWA.Storages.Get_Path (File)); end; end if; end Load; procedure Load (Service : in Storage_Service; From : in ADO.Identifier; Kind : in AWA.Storages.Models.Storage_Type; Into : out ADO.Blob_Ref) is use type Stores.Store_Access; use type Models.Storage_Type; Mode : constant Storage_Type := (if Kind = Models.FILE then Storages.FILE else TMP); DB : ADO.Sessions.Session := Service.Get_Session; Store : Stores.Store_Access; Storage : AWA.Storages.Models.Storage_Ref; File : AWA.Storages.Storage_File (Mode); Found : Boolean; begin Store := Storage_Service'Class (Service).Get_Store (Kind); if Store = null then Log.Error ("There is no store for storage {0}", Models.Storage_Type'Image (Kind)); end if; Storage.Load (DB, From, Found); if not Found then Log.Warn ("Storage entity {0} not found", ADO.Identifier'Image (From)); raise ADO.Objects.NOT_FOUND; end if; Store.Load (DB, Storage, File); Into := ADO.Create_Blob (AWA.Storages.Get_Path (File)); end Load; -- Load the storage content into a file. If the data is not stored in a file, a temporary -- file is created with the data content fetched from the store (ex: the database). -- The `Mode` parameter indicates whether the file will be read or written. -- The `Expire` parameter allows to control the expiration of the temporary file. procedure Get_Local_File (Service : in Storage_Service; From : in ADO.Identifier; Mode : in Read_Mode := READ; Into : in out Storage_File) is use type Stores.Store_Access; Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; User : constant ADO.Identifier := Ctx.Get_User_Identifier; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Query : ADO.Queries.Context; Found : Boolean; Storage : AWA.Storages.Models.Storage_Ref; Local : AWA.Storages.Models.Store_Local_Ref; Store : Stores.Store_Access; begin if Into.Storage = AWA.Storages.DATABASE then Log.Error ("'DATABASE' is not a valid storage type for local file"); return; end if; if Mode = READ then Query.Set_Query (AWA.Storages.Models.Query_Storage_Get_Local); Query.Bind_Param ("store_id", From); Query.Bind_Param ("user_id", User); Local.Find (DB, Query, Found); if Found then Into.Path := Local.Get_Path; Log.Info ("Load local file {0} path {1}", ADO.Identifier'Image (From), Ada.Strings.Unbounded.To_String (Into.Path)); return; end if; end if; Query.Set_Query (AWA.Storages.Models.Query_Storage_Get_Storage); Query.Bind_Param ("store_id", From); Query.Bind_Param ("user_id", User); Storage.Find (DB, Query, Found); if not Found then Log.Info ("File Id {0} not found", ADO.Identifier'Image (From)); raise ADO.Objects.NOT_FOUND; end if; Ctx.Start; Store := Storage_Service'Class (Service).Get_Store (Storage.Get_Storage); Store.Load (Session => DB, From => Storage, Into => Into); Ctx.Commit; Log.Info ("Load local file {0} path {1}", ADO.Identifier'Image (From), Ada.Strings.Unbounded.To_String (Into.Path)); end Get_Local_File; procedure Create_Local_File (Service : in out Storage_Service; Into : in out AWA.Storages.Storage_File) is use Ada.Strings.Unbounded; Tmp : constant String := Service.Get_Config (Stores.Files.Tmp_Directory_Parameter.P); Value : Integer; begin Util.Concurrent.Counters.Increment (Service.Temp_Id, Value); Into.Path := To_Unbounded_String (Tmp & "/tmp-" & Util.Strings.Image (Value)); if not Ada.Directories.Exists (Tmp) then Ada.Directories.Create_Path (Tmp); end if; end Create_Local_File; -- ------------------------------ -- Deletes the storage instance. -- ------------------------------ procedure Delete (Service : in Storage_Service; Storage : in out AWA.Storages.Models.Storage_Ref'Class) is Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); Id : constant ADO.Identifier := ADO.Objects.Get_Value (Storage.Get_Key); begin Log.Info ("Delete storage {0}", ADO.Identifier'Image (Id)); -- Check that the user has the delete storage permission on the given workspace. AWA.Permissions.Check (Permission => ACL_Delete_Storage.Permission, Entity => Storage); Ctx.Start; Storage_Lifecycle.Notify_Delete (Service, Storage); Storage.Delete (DB); Ctx.Commit; end Delete; -- ------------------------------ -- Deletes the storage instance. -- ------------------------------ procedure Delete (Service : in Storage_Service; Storage : in ADO.Identifier) is use type Stores.Store_Access; Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); S : AWA.Storages.Models.Storage_Ref; Query : ADO.Statements.Query_Statement := DB.Create_Statement (AWA.Storages.Models.Query_Storage_Delete_Local); Store : Stores.Store_Access; begin Log.Info ("Delete storage {0}", ADO.Identifier'Image (Storage)); -- Check that the user has the delete storage permission on the given workspace. AWA.Permissions.Check (Permission => ACL_Delete_Storage.Permission, Entity => Storage); Ctx.Start; S.Load (Id => Storage, Session => DB); Store := Storage_Service'Class (Service).Get_Store (S.Get_Storage); if Store = null then Log.Error ("There is no store associated with storage item {0}", ADO.Identifier'Image (Storage)); else Store.Delete (DB, S); end if; Storage_Lifecycle.Notify_Delete (Service, S); -- Delete the storage instance and all storage that refer to it. declare Stmt : ADO.Statements.Delete_Statement := DB.Create_Statement (AWA.Storages.Models.STORAGE_TABLE); begin Stmt.Set_Filter (Filter => "id = ? OR original_id = ?"); Stmt.Add_Param (Value => Storage); Stmt.Add_Param (Value => Storage); Stmt.Execute; end; -- Delete the local storage instances. Query.Bind_Param ("store_id", Storage); Query.Execute; S.Delete (DB); Ctx.Commit; end Delete; -- ------------------------------ -- Publish or not the storage instance. -- ------------------------------ procedure Publish (Service : in Storage_Service; Id : in ADO.Identifier; State : in Boolean; File : in out AWA.Storages.Models.Storage_Ref'Class) is pragma Unreferenced (Service); Ctx : constant Contexts.Service_Context_Access := AWA.Services.Contexts.Current; DB : ADO.Sessions.Master_Session := AWA.Services.Contexts.Get_Master_Session (Ctx); begin Ctx.Start; -- Check that the user has the permission to publish for the given comment. AWA.Permissions.Check (Permission => ACL_Delete_Storage.Permission, Entity => Id); File.Load (DB, Id); File.Set_Is_Public (State); File.Save (DB); declare Update : ADO.Statements.Update_Statement := DB.Create_Statement (AWA.Storages.Models.STORAGE_TABLE); begin Update.Set_Filter (Filter => "original_id = ?"); Update.Save_Field ("is_public", State); Update.Add_Param (Id); Update.Execute; end; Ctx.Commit; end Publish; end AWA.Storages.Services;
----------------------------------------------------------------------- -- AWA.Events.Models -- AWA.Events.Models ----------------------------------------------------------------------- -- File generated by ada-gen DO NOT MODIFY -- Template used: templates/model/package-spec.xhtml -- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095 ----------------------------------------------------------------------- -- Copyright (C) 2019 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- pragma Warnings (Off); with ADO.Sessions; with ADO.Objects; with ADO.Statements; with ADO.SQL; with ADO.Schemas; with ADO.Queries; with ADO.Queries.Loaders; with Ada.Calendar; with Ada.Containers.Vectors; with Ada.Strings.Unbounded; with Util.Beans.Objects; with Util.Beans.Objects.Enums; with Util.Beans.Basic.Lists; with AWA.Users.Models; pragma Warnings (On); package AWA.Events.Models is pragma Style_Checks ("-mr"); type Message_Status_Type is (QUEUED, PROCESSING, PROCESSED); for Message_Status_Type use (QUEUED => 0, PROCESSING => 1, PROCESSED => 2); package Message_Status_Type_Objects is new Util.Beans.Objects.Enums (Message_Status_Type); type Nullable_Message_Status_Type is record Is_Null : Boolean := True; Value : Message_Status_Type; end record; type Message_Type_Ref is new ADO.Objects.Object_Ref with null record; type Queue_Ref is new ADO.Objects.Object_Ref with null record; type Message_Ref is new ADO.Objects.Object_Ref with null record; -- Create an object key for Message_Type. function Message_Type_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Message_Type from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Message_Type_Key (Id : in String) return ADO.Objects.Object_Key; Null_Message_Type : constant Message_Type_Ref; function "=" (Left, Right : Message_Type_Ref'Class) return Boolean; -- procedure Set_Id (Object : in out Message_Type_Ref; Value : in ADO.Identifier); -- function Get_Id (Object : in Message_Type_Ref) return ADO.Identifier; -- Set the message type name procedure Set_Name (Object : in out Message_Type_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Message_Type_Ref; Value : in String); -- Get the message type name function Get_Name (Object : in Message_Type_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Message_Type_Ref) return String; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Message_Type_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Message_Type_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Message_Type_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Message_Type_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Message_Type_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Message_Type_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition MESSAGE_TYPE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Message_Type_Ref); -- Copy of the object. procedure Copy (Object : in Message_Type_Ref; Into : in out Message_Type_Ref); package Message_Type_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Message_Type_Ref, "=" => "="); subtype Message_Type_Vector is Message_Type_Vectors.Vector; procedure List (Object : in out Message_Type_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); -- -------------------- -- The message queue tracks the event messages that must be dispatched by -- a given server. -- -------------------- -- Create an object key for Queue. function Queue_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Queue from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Queue_Key (Id : in String) return ADO.Objects.Object_Key; Null_Queue : constant Queue_Ref; function "=" (Left, Right : Queue_Ref'Class) return Boolean; -- procedure Set_Id (Object : in out Queue_Ref; Value : in ADO.Identifier); -- function Get_Id (Object : in Queue_Ref) return ADO.Identifier; -- procedure Set_Server_Id (Object : in out Queue_Ref; Value : in Integer); -- function Get_Server_Id (Object : in Queue_Ref) return Integer; -- Set the message queue name procedure Set_Name (Object : in out Queue_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Name (Object : in out Queue_Ref; Value : in String); -- Get the message queue name function Get_Name (Object : in Queue_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Name (Object : in Queue_Ref) return String; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Queue_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Queue_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Queue_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Queue_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Queue_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Queue_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition QUEUE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Queue_Ref); -- Copy of the object. procedure Copy (Object : in Queue_Ref; Into : in out Queue_Ref); -- Create an object key for Message. function Message_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key; -- Create an object key for Message from a string. -- Raises Constraint_Error if the string cannot be converted into the object key. function Message_Key (Id : in String) return ADO.Objects.Object_Key; Null_Message : constant Message_Ref; function "=" (Left, Right : Message_Ref'Class) return Boolean; -- Set the message identifier procedure Set_Id (Object : in out Message_Ref; Value : in ADO.Identifier); -- Get the message identifier function Get_Id (Object : in Message_Ref) return ADO.Identifier; -- Set the message creation date procedure Set_Create_Date (Object : in out Message_Ref; Value : in Ada.Calendar.Time); -- Get the message creation date function Get_Create_Date (Object : in Message_Ref) return Ada.Calendar.Time; -- Set the message priority procedure Set_Priority (Object : in out Message_Ref; Value : in Integer); -- Get the message priority function Get_Priority (Object : in Message_Ref) return Integer; -- Set the message count procedure Set_Count (Object : in out Message_Ref; Value : in Integer); -- Get the message count function Get_Count (Object : in Message_Ref) return Integer; -- Set the message parameters procedure Set_Parameters (Object : in out Message_Ref; Value : in Ada.Strings.Unbounded.Unbounded_String); procedure Set_Parameters (Object : in out Message_Ref; Value : in String); -- Get the message parameters function Get_Parameters (Object : in Message_Ref) return Ada.Strings.Unbounded.Unbounded_String; function Get_Parameters (Object : in Message_Ref) return String; -- Set the server identifier which processes the message procedure Set_Server_Id (Object : in out Message_Ref; Value : in Integer); -- Get the server identifier which processes the message function Get_Server_Id (Object : in Message_Ref) return Integer; -- Set the task identfier on the server which processes the message procedure Set_Task_Id (Object : in out Message_Ref; Value : in Integer); -- Get the task identfier on the server which processes the message function Get_Task_Id (Object : in Message_Ref) return Integer; -- Set the message status procedure Set_Status (Object : in out Message_Ref; Value : in AWA.Events.Models.Message_Status_Type); -- Get the message status function Get_Status (Object : in Message_Ref) return AWA.Events.Models.Message_Status_Type; -- Set the message processing date procedure Set_Processing_Date (Object : in out Message_Ref; Value : in ADO.Nullable_Time); -- Get the message processing date function Get_Processing_Date (Object : in Message_Ref) return ADO.Nullable_Time; -- function Get_Version (Object : in Message_Ref) return Integer; -- Set the entity identifier to which this event is associated. procedure Set_Entity_Id (Object : in out Message_Ref; Value : in ADO.Identifier); -- Get the entity identifier to which this event is associated. function Get_Entity_Id (Object : in Message_Ref) return ADO.Identifier; -- Set the entity type of the entity identifier to which this event is associated. procedure Set_Entity_Type (Object : in out Message_Ref; Value : in ADO.Entity_Type); -- Get the entity type of the entity identifier to which this event is associated. function Get_Entity_Type (Object : in Message_Ref) return ADO.Entity_Type; -- Set the date and time when the event was finished to be processed. procedure Set_Finish_Date (Object : in out Message_Ref; Value : in ADO.Nullable_Time); -- Get the date and time when the event was finished to be processed. function Get_Finish_Date (Object : in Message_Ref) return ADO.Nullable_Time; -- procedure Set_Queue (Object : in out Message_Ref; Value : in AWA.Events.Models.Queue_Ref'Class); -- function Get_Queue (Object : in Message_Ref) return AWA.Events.Models.Queue_Ref'Class; -- Set the message type procedure Set_Message_Type (Object : in out Message_Ref; Value : in AWA.Events.Models.Message_Type_Ref'Class); -- Get the message type function Get_Message_Type (Object : in Message_Ref) return AWA.Events.Models.Message_Type_Ref'Class; -- Set the optional user who triggered the event message creation procedure Set_User (Object : in out Message_Ref; Value : in AWA.Users.Models.User_Ref'Class); -- Get the optional user who triggered the event message creation function Get_User (Object : in Message_Ref) return AWA.Users.Models.User_Ref'Class; -- Set the optional user session that triggered the message creation procedure Set_Session (Object : in out Message_Ref; Value : in AWA.Users.Models.Session_Ref'Class); -- Get the optional user session that triggered the message creation function Get_Session (Object : in Message_Ref) return AWA.Users.Models.Session_Ref'Class; -- Load the entity identified by 'Id'. -- Raises the NOT_FOUND exception if it does not exist. procedure Load (Object : in out Message_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier); -- Load the entity identified by 'Id'. -- Returns True in <b>Found</b> if the object was found and False if it does not exist. procedure Load (Object : in out Message_Ref; Session : in out ADO.Sessions.Session'Class; Id : in ADO.Identifier; Found : out Boolean); -- Find and load the entity. overriding procedure Find (Object : in out Message_Ref; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); -- Save the entity. If the entity does not have an identifier, an identifier is allocated -- and it is inserted in the table. Otherwise, only data fields which have been changed -- are updated. overriding procedure Save (Object : in out Message_Ref; Session : in out ADO.Sessions.Master_Session'Class); -- Delete the entity. overriding procedure Delete (Object : in out Message_Ref; Session : in out ADO.Sessions.Master_Session'Class); overriding function Get_Value (From : in Message_Ref; Name : in String) return Util.Beans.Objects.Object; -- Table definition MESSAGE_TABLE : constant ADO.Schemas.Class_Mapping_Access; -- Internal method to allocate the Object_Record instance overriding procedure Allocate (Object : in out Message_Ref); -- Copy of the object. procedure Copy (Object : in Message_Ref; Into : in out Message_Ref); package Message_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, Element_Type => Message_Ref, "=" => "="); subtype Message_Vector is Message_Vectors.Vector; procedure List (Object : in out Message_Vector; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class); Query_Queue_Pending_Message : constant ADO.Queries.Query_Definition_Access; private MESSAGE_TYPE_NAME : aliased constant String := "awa_message_type"; COL_0_1_NAME : aliased constant String := "id"; COL_1_1_NAME : aliased constant String := "name"; MESSAGE_TYPE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 2, Table => MESSAGE_TYPE_NAME'Access, Members => ( 1 => COL_0_1_NAME'Access, 2 => COL_1_1_NAME'Access) ); MESSAGE_TYPE_TABLE : constant ADO.Schemas.Class_Mapping_Access := MESSAGE_TYPE_DEF'Access; Null_Message_Type : constant Message_Type_Ref := Message_Type_Ref'(ADO.Objects.Object_Ref with null record); type Message_Type_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => MESSAGE_TYPE_DEF'Access) with record Name : Ada.Strings.Unbounded.Unbounded_String; end record; type Message_Type_Access is access all Message_Type_Impl; overriding procedure Destroy (Object : access Message_Type_Impl); overriding procedure Find (Object : in out Message_Type_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Message_Type_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Message_Type_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Message_Type_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Message_Type_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Message_Type_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Message_Type_Ref'Class; Impl : out Message_Type_Access); QUEUE_NAME : aliased constant String := "awa_queue"; COL_0_2_NAME : aliased constant String := "id"; COL_1_2_NAME : aliased constant String := "server_id"; COL_2_2_NAME : aliased constant String := "name"; QUEUE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 3, Table => QUEUE_NAME'Access, Members => ( 1 => COL_0_2_NAME'Access, 2 => COL_1_2_NAME'Access, 3 => COL_2_2_NAME'Access) ); QUEUE_TABLE : constant ADO.Schemas.Class_Mapping_Access := QUEUE_DEF'Access; Null_Queue : constant Queue_Ref := Queue_Ref'(ADO.Objects.Object_Ref with null record); type Queue_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => QUEUE_DEF'Access) with record Server_Id : Integer; Name : Ada.Strings.Unbounded.Unbounded_String; end record; type Queue_Access is access all Queue_Impl; overriding procedure Destroy (Object : access Queue_Impl); overriding procedure Find (Object : in out Queue_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Queue_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Queue_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Queue_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Queue_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Queue_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Queue_Ref'Class; Impl : out Queue_Access); MESSAGE_NAME : aliased constant String := "awa_message"; COL_0_3_NAME : aliased constant String := "id"; COL_1_3_NAME : aliased constant String := "create_date"; COL_2_3_NAME : aliased constant String := "priority"; COL_3_3_NAME : aliased constant String := "count"; COL_4_3_NAME : aliased constant String := "parameters"; COL_5_3_NAME : aliased constant String := "server_id"; COL_6_3_NAME : aliased constant String := "task_id"; COL_7_3_NAME : aliased constant String := "status"; COL_8_3_NAME : aliased constant String := "processing_date"; COL_9_3_NAME : aliased constant String := "version"; COL_10_3_NAME : aliased constant String := "entity_id"; COL_11_3_NAME : aliased constant String := "entity_type"; COL_12_3_NAME : aliased constant String := "finish_date"; COL_13_3_NAME : aliased constant String := "queue_id"; COL_14_3_NAME : aliased constant String := "message_type_id"; COL_15_3_NAME : aliased constant String := "user_id"; COL_16_3_NAME : aliased constant String := "session_id"; MESSAGE_DEF : aliased constant ADO.Schemas.Class_Mapping := (Count => 17, Table => MESSAGE_NAME'Access, Members => ( 1 => COL_0_3_NAME'Access, 2 => COL_1_3_NAME'Access, 3 => COL_2_3_NAME'Access, 4 => COL_3_3_NAME'Access, 5 => COL_4_3_NAME'Access, 6 => COL_5_3_NAME'Access, 7 => COL_6_3_NAME'Access, 8 => COL_7_3_NAME'Access, 9 => COL_8_3_NAME'Access, 10 => COL_9_3_NAME'Access, 11 => COL_10_3_NAME'Access, 12 => COL_11_3_NAME'Access, 13 => COL_12_3_NAME'Access, 14 => COL_13_3_NAME'Access, 15 => COL_14_3_NAME'Access, 16 => COL_15_3_NAME'Access, 17 => COL_16_3_NAME'Access) ); MESSAGE_TABLE : constant ADO.Schemas.Class_Mapping_Access := MESSAGE_DEF'Access; Null_Message : constant Message_Ref := Message_Ref'(ADO.Objects.Object_Ref with null record); type Message_Impl is new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER, Of_Class => MESSAGE_DEF'Access) with record Create_Date : Ada.Calendar.Time; Priority : Integer; Count : Integer; Parameters : Ada.Strings.Unbounded.Unbounded_String; Server_Id : Integer; Task_Id : Integer; Status : AWA.Events.Models.Message_Status_Type; Processing_Date : ADO.Nullable_Time; Version : Integer; Entity_Id : ADO.Identifier; Entity_Type : ADO.Entity_Type; Finish_Date : ADO.Nullable_Time; Queue : AWA.Events.Models.Queue_Ref; Message_Type : AWA.Events.Models.Message_Type_Ref; User : AWA.Users.Models.User_Ref; Session : AWA.Users.Models.Session_Ref; end record; type Message_Access is access all Message_Impl; overriding procedure Destroy (Object : access Message_Impl); overriding procedure Find (Object : in out Message_Impl; Session : in out ADO.Sessions.Session'Class; Query : in ADO.SQL.Query'Class; Found : out Boolean); overriding procedure Load (Object : in out Message_Impl; Session : in out ADO.Sessions.Session'Class); procedure Load (Object : in out Message_Impl; Stmt : in out ADO.Statements.Query_Statement'Class; Session : in out ADO.Sessions.Session'Class); overriding procedure Save (Object : in out Message_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Create (Object : in out Message_Impl; Session : in out ADO.Sessions.Master_Session'Class); overriding procedure Delete (Object : in out Message_Impl; Session : in out ADO.Sessions.Master_Session'Class); procedure Set_Field (Object : in out Message_Ref'Class; Impl : out Message_Access); package File_1 is new ADO.Queries.Loaders.File (Path => "queue-messages.xml", Sha1 => "9B2B599473F75F92CB5AB5045675E4CCEF926543"); package Def_Queue_Pending_Message is new ADO.Queries.Loaders.Query (Name => "queue-pending-message", File => File_1.File'Access); Query_Queue_Pending_Message : constant ADO.Queries.Query_Definition_Access := Def_Queue_Pending_Message.Query'Access; end AWA.Events.Models;
with Zstandard.Functions.Streaming_Decompression; use Zstandard.Functions; with Ada.Command_line; use Ada.Command_Line; with Ada.Directories; use Ada.Directories; with Ada.Text_IO; use Ada.Text_IO; with Ada.Exceptions; use Ada.Exceptions; with Ada.Streams.Stream_IO; use Ada.Streams; procedure Demo_Ada is begin if Argument_Count /= 1 then Put_Line ("Zstandard version: " & Zstd_Version); Put_Line ("usage:"); Put_Line (Command_Name & " <path/to/file.zst>"); return; end if; declare path2file : String renames Argument (1); namelen : constant Natural := path2file'Length; nlast : constant Natural := path2file'Last; begin if not Exists (path2file) then Put_Line ("File '" & path2file & "' does not exist, aborting."); return; else if namelen < 5 or else path2file (nlast - 3 .. nlast) /= ".zst" then Put_Line ("File name doesn't have the .zst extension, aborting."); return; end if; end if; end; declare type Real4 is digits 4; path2file : String renames Argument (1); src_file : Stream_IO.File_Type; mech : Streaming_Decompression.Decompressor; complete : Boolean := False; plaintext : Streaming_Decompression.Output_Data_Container; last_one : Natural; sum : Natural := 0; begin Stream_IO.Open (File => src_file, Mode => Stream_IO.In_File, Name => path2file); mech.Initialize (input_stream => Stream_IO.Stream (src_file)); loop exit when complete; mech.Decompress_Data (complete => complete, output_data => plaintext, last_element => last_one); if last_one > 0 then declare message : String (1 .. last_one); begin for z in message'Range loop message (z) := Character'val (plaintext (Stream_Element_Offset (z))); end loop; Put (message); sum := sum + last_one; end; end if; end loop; Stream_IO.Close (src_file); Put_Line ("total length:" & sum'Img); exception when Error : others => Put_Line (Exception_Information(Error)); if Stream_IO.Is_Open (src_file) then Stream_IO.Close (src_file); end if; end; end Demo_Ada;
-- C54A24A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT NULL SUBRANGE CHOICES MAY OCCUR IN CASE STATEMENT, WITH -- OUT-OF-BOUNDS RANGE BOUNDS, AND WHERE VACUOUS CHOICES ARE NULL. -- CHECK THAT AN UNNEEDED OTHERS CHOICE IS PERMITTED. -- DAT 1/29/81 -- JBG 8/21/83 WITH REPORT; PROCEDURE C54A24A IS USE REPORT; TYPE T IS RANGE 1 .. 1010; SUBTYPE ST IS T RANGE 5 .. 7; V : ST := 6; BEGIN TEST ("C54A24A", "CHECK NULL CASE SUBRANGE CHOICES, WITH " & "OUTRAGEOUS BOUNDS"); CASE V IS WHEN -1000 .. -1010 => NULL; WHEN T RANGE -5 .. -6 => NULL; WHEN 12 .. 11 | ST RANGE 1000 .. 99 => NULL; WHEN ST RANGE -99 .. -999 => NULL; WHEN ST RANGE 6 .. 6 => V := V - 1; WHEN T RANGE ST'BASE'LAST .. ST'BASE'FIRST => NULL; WHEN 5 | 7 => NULL; WHEN ST RANGE T'BASE'LAST .. T'BASE'FIRST => NULL; WHEN T'BASE'LAST .. T'BASE'FIRST => NULL; WHEN OTHERS => V := V + 1; END CASE; IF V /= 5 THEN FAILED ("IMPROPER CASE EXECUTION"); END IF; RESULT; END C54A24A;
------------------------------------------------------------------------------ -- -- -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- S Y S T E M . T A S K I N G . Q U E U I N G -- -- -- -- S p e c -- -- -- -- $Revision$ -- -- -- Copyright (C) 1991-1998 Florida State University -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 2, or (at your option) any later ver- -- -- sion. GNARL is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -- -- for more details. You should have received a copy of the GNU General -- -- Public License distributed with GNARL; see file COPYING. If not, write -- -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, -- -- MA 02111-1307, USA. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an executable, -- -- this unit does not by itself cause the resulting executable to be -- -- covered by the GNU General Public License. This exception does not -- -- however invalidate any other reasons why the executable file might be -- -- covered by the GNU Public License. -- -- -- -- GNARL was developed by the GNARL team at Florida State University. It is -- -- now maintained by Ada Core Technologies Inc. in cooperation with Florida -- -- State University (http://www.gnat.com). -- -- -- ------------------------------------------------------------------------------ with System.Tasking.Protected_Objects.Entries; package System.Tasking.Queuing is package POE renames System.Tasking.Protected_Objects.Entries; procedure Broadcast_Program_Error (Self_ID : Task_ID; Object : POE.Protection_Entries_Access; Pending_Call : Entry_Call_Link); -- Raise Program_Error in all tasks calling the protected entries -- of Object. The exception will not be raised immediately for -- the calling task; it will be deferred until it calls -- Raise_Pending_Exception. procedure Enqueue (E : in out Entry_Queue; Call : Entry_Call_Link); -- Enqueue Call at the end of entry_queue E procedure Dequeue (E : in out Entry_Queue; Call : Entry_Call_Link); -- Dequeue Call from entry_queue E function Head (E : in Entry_Queue) return Entry_Call_Link; -- Return the head of entry_queue E pragma Inline (Head); procedure Dequeue_Head (E : in out Entry_Queue; Call : out Entry_Call_Link); -- Remove and return the head of entry_queue E function Onqueue (Call : Entry_Call_Link) return Boolean; -- Return True if Call is on any entry_queue at all pragma Inline (Onqueue); function Count_Waiting (E : in Entry_Queue) return Natural; -- Return number of calls on the waiting queue of E procedure Select_Task_Entry_Call (Acceptor : Task_ID; Open_Accepts : Accept_List_Access; Call : out Entry_Call_Link; Selection : out Select_Index; Open_Alternative : out Boolean); -- Select an entry for rendezvous. On exit: -- Call will contain a pointer to the entry call record selected; -- Selection will contain the index of the alternative selected -- Open_Alternative will be True if there were any open alternatives procedure Select_Protected_Entry_Call (Self_ID : Task_ID; Object : POE.Protection_Entries_Access; Call : out Entry_Call_Link); -- Select an entry of a protected object procedure Enqueue_Call (Entry_Call : Entry_Call_Link); procedure Dequeue_Call (Entry_Call : Entry_Call_Link); -- Enqueue (dequeue) the call to (from) whatever server they are -- calling, whether a task or a protected object. procedure Requeue_Call_With_New_Prio (Entry_Call : Entry_Call_Link; Prio : System.Any_Priority); -- Change Priority of the call and re insert to the queue when priority -- queueing is in effect. When FIFO is inforced, this routine -- should not have any effect. end System.Tasking.Queuing;