CombinedText
stringlengths
4
3.42M
pragma License (Unrestricted); -- implementation unit required by compiler with Ada.IO_Exceptions; with Ada.Streams; with System.Unsigned_Types; package System.Stream_Attributes is pragma Preelaborate; -- required for 'Read/'Write attributes by compiler (s-stratt.ads) type Thin_Pointer is record P1 : Address; end record; pragma Suppress_Initialization (Thin_Pointer); type Fat_Pointer is record P1 : Address; P2 : Address; end record; pragma Suppress_Initialization (Fat_Pointer); function I_AD (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Fat_Pointer; function I_AS (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Thin_Pointer; function I_B (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Boolean; function I_C (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Character; function I_F (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Float; function I_I (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Integer; function I_LF (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Long_Float; function I_LI (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Long_Integer; function I_LLF (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Long_Long_Float; function I_LLI (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Long_Long_Integer; function I_LLU (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Unsigned_Types.Long_Long_Unsigned; function I_LU (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Unsigned_Types.Long_Unsigned; function I_SF (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Short_Float; function I_SI (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Short_Integer; function I_SSI (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Short_Short_Integer; function I_SSU (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Unsigned_Types.Short_Short_Unsigned; function I_SU (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Unsigned_Types.Short_Unsigned; function I_U (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Unsigned_Types.Unsigned; function I_WC (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Wide_Character; function I_WWC (Stream : not null access Ada.Streams.Root_Stream_Type'Class) return Wide_Wide_Character; pragma Inline (I_AD); pragma Inline (I_AS); pragma Inline (I_B); pragma Inline (I_C); pragma Inline (I_F); pragma Inline (I_I); pragma Inline (I_LF); pragma Inline (I_LI); pragma Inline (I_LLF); pragma Inline (I_LLI); pragma Inline (I_LLU); pragma Inline (I_LU); pragma Inline (I_SF); pragma Inline (I_SI); pragma Inline (I_SSI); pragma Inline (I_SSU); pragma Inline (I_SU); pragma Inline (I_U); pragma Inline (I_WC); pragma Inline (I_WWC); procedure W_AD ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Fat_Pointer); procedure W_AS ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Thin_Pointer); procedure W_B ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Boolean); procedure W_C ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Character); procedure W_F ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Float); procedure W_I ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Integer); procedure W_LF ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Long_Float); procedure W_LI ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Long_Integer); procedure W_LLF ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Long_Long_Float); procedure W_LLI ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Long_Long_Integer); procedure W_LLU ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Unsigned_Types.Long_Long_Unsigned); procedure W_LU ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Unsigned_Types.Long_Unsigned); procedure W_SF ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Short_Float); procedure W_SI ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Short_Integer); procedure W_SSI ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Short_Short_Integer); procedure W_SSU ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Unsigned_Types.Short_Short_Unsigned); procedure W_SU ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Unsigned_Types.Short_Unsigned); procedure W_U ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Unsigned_Types.Unsigned); procedure W_WC ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Wide_Character); procedure W_WWC ( Stream : not null access Ada.Streams.Root_Stream_Type'Class; Item : Wide_Wide_Character); pragma Inline (W_AD); pragma Inline (W_AS); pragma Inline (W_B); pragma Inline (W_C); pragma Inline (W_F); pragma Inline (W_I); pragma Inline (W_LF); pragma Inline (W_LI); pragma Inline (W_LLF); pragma Inline (W_LLI); pragma Inline (W_LLU); pragma Inline (W_LU); pragma Inline (W_SF); pragma Inline (W_SI); pragma Inline (W_SSI); pragma Inline (W_SSU); pragma Inline (W_SU); pragma Inline (W_U); pragma Inline (W_WC); pragma Inline (W_WWC); -- required for default 'Read/'Write attributes by compiler (s-stratt.ads) -- in original libgnat, Block_IO_OK is a function, but constant is ok (?) Block_IO_OK : constant Boolean := True; -- exceptions End_Error : exception renames Ada.IO_Exceptions.End_Error; end System.Stream_Attributes;
with Ada.Text_IO; use Ada.Text_IO; with Ada.Assertions; use Ada.Assertions; with Ada.Numerics.Discrete_Random; with Ada.Characters.Latin_1; use Ada.Characters.Latin_1; with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Calendar; use Ada.Calendar; with Ada.Directories; use Ada.Directories; procedure Scramble_With_Harness is -------------------------- Main Subprograms --------------------------- procedure getFilename(File_Name : out String; Len : out Integer); function processText(File_Name : String) return Integer; procedure scrambleWord(Str : in out String); function randomInt(A : Integer; B : Integer) return Integer; function isWord(Str : String) return Boolean; ----------------------------------------------------------------------- -- Verifies a filename and returns it to main procedure getFilename(File_Name : out String; Len : out Integer) is begin File_Name_Check: loop -- Prompt user for filename Put("Please enter a filename, or 'test/sample.txt': "); Get_Line(File_Name, Len); -- Filename testing. Assumed to ask again if loop doesn't break if (File_Name(File_Name'First .. Len) = "" or else File_Name(File_Name'First .. File_Name'First) = "." or else File_Name(File_Name'First .. File_Name'First) = "/" or else exists(File_Name(File_Name'First .. Len)) = False) then Put_Line("Could not open file! Re-try."); New_Line; -- Loop will break and function will exit assuming all tests pass else exit File_Name_Check; end if; end loop File_Name_Check; end getFilename; -- Processes the words within a file function processText(File_Name : String) return Integer is Word_Count : Integer := 0; Fp : Ada.Text_IO.File_Type; begin -- Open the file for playback Open(File => Fp, Mode => In_File, Name => File_Name); -- Print every original line Put_Line(" O r i g i n a l T e x t"); Put_Line("--------------------------------------------------" & "----------------------"); while not End_Of_File(Fp) loop Put_Line(Get_Line(Fp)); end loop; New_Line; Close(Fp); -- Attempt to open the file again, this time for processing Open(File => Fp, Mode => In_File, Name => File_Name); -- Process file by iterating over every line Put_Line(" T r a n s p o s e d T e x t"); Put_Line("--------------------------------------------------" & "----------------------"); -- Like above, we iterate over the file while not End_Of_File(Fp) loop declare -- Left and Right represent slice/substring indices for parsing -- Line is the fixed string holding the line. Because it is within -- block scope with the loop, we do not have to use unbounded -- string. This is because we re-create it every loop iteration. Left : Integer := 1; Right : Integer := 1; Line : String := Get_Line(Fp); begin -- Parsing algorithm that aims to 'greedily' select the largest -- word using Left and Right to index potential substrings, and -- then moving to the next potential candidate. -- This algorithm will backtrack upon discovering a non-alpha -- character and use the backtracked 'word' as the scramble target. -- Otherwise, it will just print out, one-by-one, as many non- -- alpha characters as possible before returning to the greedy -- word building algorithm as mentioned earlier. -- This algorithm, as shown in this while loop, will only run for -- the length of the current line. This is for bounds-checking. while Left <= Line'Length and then Right <= Line'Length loop -- If current substring is a word... if isWord(Line(Left .. Right)) then -- ...then greedily grow it until it is no longer a word. while Right <= Line'Length and then isWord(Line(Left .. Right)) loop Right := Right + 1; end loop; -- Upon finding a non-alpha character, we backtrack 1 Right := Right - 1; -- We know that this backtracked word is the largest -- possible substring that satisfies isWord(), so we go on -- to scramble it in-place and then print it. scrambleWord(Line(Left .. Right)); Put(Line(Left .. Right)); -- In doing so, we increment the word count. Word_Count := Word_Count + 1; -- Then, we set both Left and Right indices into the first -- character following the word we just scrambled. Right := Right + 1; Left := Right; -- Otherwise, if the current substring is NOT a word... else -- ...we don't want to do anything else but print it. Put(Line(Left .. Right)); -- In fact, we print AS MANY non-alphabetic characters as -- possible. As long as there are more, it will always -- fall back to this else statement. Left := Left + 1; Right := Right + 1; end if; end loop; -- We are finished parsing the file New_Line; -- Putting a new line for cleanliness end; -- End loop scope end loop; -- End the actual loop -- Close the file when we are done and return word count Close(Fp); return Word_Count; end processText; -- Scramble a string / "word" in-place procedure scrambleWord(Str : in out String) is -- Copies the string not including first/last char. Copy : String := Str(Str'First + 1 .. Str'Last - 1); Rand : Integer; begin -- Only words 4 char. or greater will be scrambled if Str'Length > 3 then -- Iterate over the middle characters for i in 2 .. Str'Length - 1 loop -- Keep looping until we get a unique letter loop Rand := randomInt(A => Copy'First, B => Copy'Last + 1); exit when Copy(Rand) /= '.'; end loop; -- Copy this character over to the scrambled word Str(Str'First + i - 1) := Copy(Rand); -- Mark the original character spot as "used". -- This method only works because only true words -- are passed to scrambleWord(). Copy(Rand) := '.'; end loop; end if; end scrambleWord; -- Check if a string is completely alphabetic function isWord(Str : String) return Boolean is begin -- Check for empty string if Str = "" then return False; end if; -- Check if each character is alphabetic for i in Str'First .. Str'Last loop if not Is_Letter(Str(i)) then return False; end if; end loop; -- If we reach this point, it's a good string and we exit return true; end isWord; -- Generate a random number on the interval [A, B) (incl. - excl.) function randomInt(A : Integer; B : Integer) return Integer is subtype IntGen is Integer range A .. B - 1; package RandGen is new Ada.Numerics.Discrete_Random (IntGen); use RandGen; RandIntGen : Generator; begin -- Generate our number Reset(RandIntGen); return Random(RandIntGen); end randomInt; ------------------------- Testing Subprograms ------------------------- procedure Test_randomInt(A : Integer; B : Integer); procedure Test_isWord(Str : String; Expected : Boolean); procedure Test_scrambleWord(Str : String); procedure Test_derangement(Str : String); ----------------------------------------------------------------------- -- Tests the return value of randomInt() procedure Test_randomInt(A : Integer; B : Integer) is Rand_Value : Integer; Checks : array(-10000 .. 10000) of Integer := (others => 0); begin -- Assert all outputs are in range for 10,000 trials for i in 1 .. 10000 loop Rand_Value := randomInt(A, B); Checks(Rand_Value) := 1; Assert(Rand_Value >= A and Rand_Value < B, "randomInt(" & Integer'Image(A) & "," & Integer'Image(B) & ") failed!" & " Got " & Integer'Image(Rand_Value)); end loop; -- Assert function is surjective / "onto" range for i in A .. B - 1 loop Assert(Checks(i) = 1, "Value " & Integer'Image(i) & " not found in range [" & Integer'Image(A) & ", " & Integer'Image(B) & ")."); end loop; Put_Line(" PASS: randomInt(" & Integer'Image(A) & "," & Integer'Image(B) & ")"); end Test_randomInt; -- Tests the return value of isWord() procedure Test_isWord(Str : String; Expected : Boolean) is begin -- Assert word status Assert(isWord(Str) = Expected, "isWord(" & str & ") failed! " & "Expected " & Boolean'Image(Expected)); Put_Line(" PASS: isWord(" & str & ")"); end test_isWord; -- Tests the word scrambling of scrambleWord() procedure Test_scrambleWord(Str : String) is Copy : String := Str; Temp : String := Str; begin -- Scramble a copy of the word scrambleWord(Copy); -- Assert that words with length < 4 are untouched if Str'Length < 4 then Assert(Str = Copy, "scrambleWord(" & Str & ") failed" & " and returned " & Copy & ". Words less than" & " 4 characters must be untouched!"); end if; -- Assert that scrambleWord() creates an actual word Assert(isWord(Copy) = True, Copy & " is not a word!"); -- Assert the two strings are the same length Assert(Copy'Length = Str'Length, Copy & " != " & Str); -- Assert that the first letters match Assert(Copy(Copy'First) = Str(Str'First), "scrambleWord(" & Str & ") => " & Copy & " failed. First letters don't match!"); -- Assert that the last letters match Assert(Copy(Copy'Last) = Str(Str'Last), "scrambleWord(" & Str & ") => " & Copy & " failed. Last letters don't match!"); -- Confirm that the two words are anagrams by checking letters for i in Copy'First .. Copy'Last loop for j in Temp'First .. Temp'Last loop if Copy(i) = Temp(j) then Temp(j) := '.'; end if; end loop; end loop; -- Verify the guard character, the period. Because we verify -- that isWord() gives true, the period is free to use for i in Temp'First .. Temp'Last loop Assert(Temp(i) = '.', Copy & " and " & Str & " are not anagrams!"); end loop; -- Test passed at this point Put_Line(" PASS: scrambleWord(" & Str & ")"); end Test_scrambleWord; -- Tests substring derangement. HELLO has a potential derangement -- at ELL. The first and last character must remain, but all of the -- characters in-between must be moved. Of course, sometimes they, -- by complete chance, don't. Which is why I will run 1000 trials. -- -- The goal is to find at least one derangement, which is where all -- of the non-first non-last characters are out of order. -- -- This test will run after all the Test_scrambleWord() trials so -- that I know scrambleWord() is capable of creating anagrams. procedure Test_derangement(Str : String) is Copy : String := Str; Found : Boolean := True; begin if Str'Length > 3 then for trial in 1 .. 1000 loop Found := True; scrambleWord(Copy); for i in Copy'First + 1 .. Copy'Last - 1 loop if Copy(i) = Str(i) then Found := False; end if; end loop; if Found then exit; end if; end loop; Assert(Found, "Could not force derangement on " & "scrambleWord(" & Str & "). Returned " & Copy); Put_Line(" PASS: scrambleWord(" & Str & ")"); end if; end Test_derangement; -- Main variables File_Name_Len : Integer; File_Name : String(1..5000); Num_Words : Integer; Start_Time, End_Time : Time; Millis : Duration; ----------------------------------------------------------------------- begin -- Test harness Put_Line(ESC & "[32m" & "Starting automatic tests!" & ESC & "[0m"); Start_Time := Clock; -- randomInt() range test Put_Line("Testing randomInt()..."); New_Line; Test_randomInt(1, 5); Test_randomInt(10, 500); Test_randomInt(-10, 5); Test_randomInt(-10, 0); Test_randomInt(0, 50); Test_randomInt(-100, 100); Test_randomInt(-1, 0); Test_randomInt(1, 2); Test_randomInt(2, 3); Test_randomInt(10, 11); Test_randomInt(100, 101); Test_randomInt(1000, 1001); New_Line; -- isWord() true test Put_Line("Testing isWord() for true..."); New_Line; Test_isWord("a", true); Test_isWord("z", true); Test_isWord("abasjdklflksdf", true); Test_isWord("A", true); Test_isWord("Z", true); Test_isWord("AZ", true); Test_isWord("ASDFJSADFJSADKFJAG", true); Test_isWord("ABCDEFGHIJKLMNOPQRSTUVWXYZ", true); Test_isWord("abcdefghijklmnopqrstuvwxys", true); for i in 65 .. 90 loop Test_isWord(Character'Image(Character'Val(i))(2 .. 2), true); end loop; for i in 97 .. 122 loop Test_isWord(Character'Image(Character'Val(i))(2 .. 2), true); end loop; New_Line; -- isWord() false test Put_Line("Testing isWord() for false..."); New_Line; Test_isWord("", false); Test_isWord("1", false); Test_isWord("28375498275", false); Test_isWord("!", false); Test_isWord(" ", false); Test_isWord("ABa313", false); Test_isWord("aaskdfjaskdfashdf1", false); Test_isWord("hsadfjasdf[aksdjfaskdf", false); Test_isWord("sakdjfl`aksdjf", false); Test_isWord("adsf~~asdfasdf", false); Test_isWord("ABCDEFGHIJKL~MNOPQRSTUVWXYZ", false); Test_isWord("1234567890][';/.[p,p.][}{>{}>}{>{}", false); for i in 32 .. 64 loop Test_isWord(Character'Image(Character'Val(i))(2 .. 2), false); end loop; for i in 91 .. 96 loop Test_isWord(Character'Image(Character'Val(i))(2 .. 2), false); end loop; for i in 123 .. 126 loop Test_isWord(Character'Image(Character'Val(i))(2 .. 2), false); end loop; New_Line; -- isWord() escape sequence test Put_Line("Testing isWord() for false with escape sequences..."); New_Line; for i in 0 .. 31 loop Test_isWord(ESC & Integer'Image(i), false); end loop; Test_isWord(ESC & Integer'Image(127), false); New_Line; -- scrambleWord() anagram test Put_Line("Testing scrambleWord()..."); New_Line; Test_scrambleWord("a"); Test_scrambleWord("z"); Test_scrambleWord("ad"); Test_scrambleWord("hel"); Test_scrambleWord("HASfdhasFDDFhasdf"); Test_scrambleWord("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); Test_scrambleWord("abcdefghijklmnopqrstuvwxyz"); Test_scrambleWord("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); Test_scrambleWord("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"); Test_scrambleWord("ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"); Test_scrambleWord("OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO"); Test_scrambleWord("IJUSTLOSTTHEGAMEEEEEEEEEEEEEEEEEEEEEEEEEE"); Test_scrambleWord("ABCDEFGHIJKLMNOPQRSTUVWXYZ" & "abcdefghijklmnopqrstuvwxyz"); Test_scrambleWord("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno" & "pqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcd" & "efghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS" & "TUVWXYZabcdefghijklmnopqrstuvwxyzABCDEFGH" & "IJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw" & "xyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkl" & "mnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZa" & "bcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP" & "QRSTUVWXYZabcdefghijklmnopqrstuvwxyzABCDE" & "FGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst" & "uvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi" & "jklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX" & "YZabcdefABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFG"); New_Line; -- scrambleWord() derangement test Put_Line("Testing derangements..."); New_Line; Test_derangement("ABCDEFGH"); Test_derangement("abcdefgh"); Test_derangement("IJKLMNOP"); Test_derangement("ijklmnop"); Test_derangement("QRSTUVWX"); Test_derangement("qrstuvwx"); Test_derangement("YZ"); Test_derangement("yz"); New_Line; Put_Line(ESC & "[32m" & "Passed all automatic tests" & ESC &"[0m"); Put_Line(ESC & "[32m" & "Starting manual tests!" & ESC & "[0m"); -- processTest() manual analysis New_Line; Put_Line("Testing 1000 most common English words..."); Put_Line("You should be able to recognize these"); New_Line; Num_Words := processText("test/test.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing punctuation nightmare"); Put_Line("Punctuation should be intact; words scrambled"); New_Line; Num_Words := processText("test/punctuation.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing 3-letter words"); Put_Line("There should be NO change"); New_Line; Num_Words := processText("test/3letter.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing 2-letter words"); Put_Line("There should be NO change"); New_Line; Num_Words := processText("test/2letter.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing 1-letter words"); Put_Line("There should be NO change"); New_Line; Num_Words := processText("test/1letter.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing d2.txt"); New_Line; Num_Words := processText("test/d2.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing dijkstra.txt"); New_Line; Num_Words := processText("test/dijkstra.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing middleE.txt"); New_Line; Num_Words := processText("test/middleE.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing z.txt"); New_Line; Num_Words := processText("test/z.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing empire.txt"); New_Line; Num_Words := processText("test/empire.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Testing quotations.txt"); New_Line; Num_Words := processText("test/quotations.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); New_Line; Put_Line("Arthur's behemoth"); New_Line; -- Num_Words := processText("test/amurica.txt"); New_Line; Put_Line("Word Count: " & Integer'Image(Num_Words)); End_Time := Clock; Millis := (End_Time - Start_Time) * 1000; New_Line; Put_Line(ESC & "[32m" & "All automatic tests passed!" & ESC & "[0m"); Put_Line("Now, scroll up and manually examine your sample outputs."); New_Line; Put_Line(ESC & "[32m" & "Runtime: " & Duration'Image(Millis) & ESC & "[0m"); -- Main code getFilename(File_Name, File_Name_Len); New_Line; Num_Words := processText(File_Name(1..File_Name_Len)); New_Line; Put_Line("Word count: " & Integer'Image(Num_Words)); end Scramble_With_Harness; -----------------------------------------------------------------------
-- Abstract : -- -- See spec. -- -- Copyright (C) 2017, 2019 Free Software Foundation All Rights Reserved. -- -- 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 (Modified_GPL); with Ada.Strings.Unbounded; with Ada.Text_IO; with SAL.Gen_Bounded_Definite_Queues; with SAL.Gen_Unbounded_Definite_Stacks; package body SAL.Gen_Graphs is package Vertex_Queues is new SAL.Gen_Bounded_Definite_Queues (Vertex_Index); package Vertex_Stacks is new SAL.Gen_Unbounded_Definite_Stacks (Vertex_Index); function Find (Data : in Edge_Data; List : in Edge_Node_Lists.List) return Edge_Node_Lists.Cursor is begin for I in List.Iterate loop if Edge_Node_Lists.Element (I).Data = Data then return I; end if; end loop; return Edge_Node_Lists.No_Element; end Find; ---------- -- Visible subprograms procedure Add_Edge (Graph : in out Gen_Graphs.Graph; Vertex_A : in Vertex_Index; Vertex_B : in Vertex_Index; Data : in Edge_Data) is Multigraph : Boolean := False; procedure Update_First_Last (Vertex : in Vertex_Index) is use all type Ada.Containers.Count_Type; begin if Graph.Vertices.Length = 0 then Graph.Vertices.Set_First_Last (Vertex, Vertex); else if Vertex < Graph.Vertices.First_Index then Graph.Vertices.Set_First (Vertex); end if; if Vertex > Graph.Vertices.Last_Index then Graph.Vertices.Set_Last (Vertex); end if; end if; end Update_First_Last; begin Update_First_Last (Vertex_A); Update_First_Last (Vertex_B); Graph.Last_Edge_ID := Graph.Last_Edge_ID + 1; if (for some E of Graph.Vertices (Vertex_A) => E.Vertex_B = Vertex_B) then Multigraph := True; Graph.Multigraph := True; end if; Graph.Vertices (Vertex_A).Append ((Graph.Last_Edge_ID, Vertex_B, Multigraph, Data)); end Add_Edge; function Count_Nodes (Graph : in Gen_Graphs.Graph) return Ada.Containers.Count_Type is begin return Graph.Vertices.Length; end Count_Nodes; function Count_Edges (Graph : in Gen_Graphs.Graph) return Ada.Containers.Count_Type is use Ada.Containers; Result : Count_Type := 0; begin for Edges of Graph.Vertices loop Result := Result + Edges.Length; end loop; return Result; end Count_Edges; function Multigraph (Graph : in Gen_Graphs.Graph) return Boolean is begin return Graph.Multigraph; end Multigraph; function "+" (Right : in Edge_Item) return Edge_Lists.List is use Edge_Lists; begin return Result : List do Append (Result, Right); end return; end "+"; function Edges (Graph : in Gen_Graphs.Graph; Vertex : in Vertex_Index) return Edge_Lists.List is begin return Result : Edge_Lists.List do for E of Graph.Vertices (Vertex) loop Result.Append ((E.ID, E.Data)); end loop; end return; end Edges; function Image (Item : in Path) return String is use Ada.Strings.Unbounded; Result : Unbounded_String := To_Unbounded_String ("("); begin for I in Item'Range loop Result := Result & Trimmed_Image (Item (I).Vertex) & " " & Image ((if I = Item'Last then Item (Item'First).Edges else Item (I + 1).Edges)) & " -> "; end loop; Result := Result & ")"; return To_String (Result); end Image; function "<" (Left, Right : in Path) return Boolean is begin for I in Left'Range loop if I > Right'Last then return False; elsif Left (I).Vertex < Right (I).Vertex then return True; elsif Left (I).Vertex > Right (I).Vertex then return False; else -- =; check remaining elements null; end if; end loop; if Left'Last < Right'Last then return True; else -- All = return False; end if; end "<"; function Find_Paths (Graph : in out Gen_Graphs.Graph; From : in Vertex_Index; To : in Edge_Data) return Path_Arrays.Vector is Vertex_Queue : Vertex_Queues.Queue_Type (Size => Integer (Graph.Vertices.Last_Index - Graph.Vertices.First_Index + 1)); type Colors is (White, Gray, Black); type Aux_Node is record Color : Colors := Colors'First; D : Natural := Natural'Last; Parent : Vertex_Index'Base := Invalid_Vertex; Parent_Set : Boolean := False; Parent_Edge : Edge_Node_Lists.Cursor := Edge_Node_Lists.No_Element; end record; package Aux_Arrays is new SAL.Gen_Unbounded_Definite_Vectors (Vertex_Index, Aux_Node, (others => <>)); Aux : Aux_Arrays.Vector; function Build_Path (Tail_Vertex : in Vertex_Index; Tail_Edge : in Edge_Node_Lists.Cursor) return Path is begin return Result : Path (1 .. Aux (Tail_Vertex).D + 1) do declare use Edge_Node_Lists; V_Index : Vertex_Index := Tail_Vertex; Last_Edge : Cursor := Tail_Edge; begin for I in reverse 1 .. Result'Length loop declare V : Aux_Node renames Aux (V_Index); begin if Last_Edge = No_Element then Result (I) := (V_Index, Edge_Lists.Empty_List); else Result (I) := (V_Index, +(Element (Last_Edge).ID, Element (Last_Edge).Data)); end if; if V.Parent_Set then Last_Edge := V.Parent_Edge; V_Index := V.Parent; end if; end; end loop; end; end return; end Build_Path; Result_List : Path_Arrays.Vector; Result_Edge : Edge_Node_Lists.Cursor; begin -- [1] figure 22.3 breadth-first search; 'From' = s. Aux.Set_First_Last (Graph.Vertices.First_Index, Graph.Vertices.Last_Index); for I in Aux.First_Index .. Aux.Last_Index loop if I = From then Aux (I).Color := Gray; Aux (I).D := 0; Aux (I).Parent_Set := False; else Aux (I).Color := White; Aux (I).D := Natural'Last; Aux (I).Parent_Set := False; end if; end loop; Vertex_Queue.Put (From); while not Vertex_Queue.Is_Empty loop declare U_Index : constant Vertex_Index := Vertex_Queue.Get; U : Aux_Node renames Aux (U_Index); begin Edges : for C in Graph.Vertices (U_Index).Iterate loop declare use all type Edge_Node_Lists.Cursor; V_Index : constant Vertex_Index := Edge_Node_Lists.Element (C).Vertex_B; V : Aux_Node renames Aux (V_Index); begin if V.Color = White then V.Color := Gray; V.D := U.D + 1; V.Parent := U_Index; V.Parent_Edge := C; V.Parent_Set := True; Result_Edge := Find (To, Graph.Vertices (V_Index)); if Result_Edge /= Edge_Node_Lists.No_Element then Result_List.Append (Build_Path (V_Index, Result_Edge)); end if; Vertex_Queue.Put (V_Index); end if; end; end loop Edges; U.Color := Black; end; end loop; return Result_List; end Find_Paths; function Find_Cycles_Tiernan (Graph : in Gen_Graphs.Graph) return Path_Arrays.Vector is -- Implements [2] "Algorithm EC" -- -- vertex 0 = Invalid_Vertex -- vertex 1 = Graph.Vertices.First_Index -- vertex N = Graph.Vertices.Last_Index First : Vertex_Index renames Graph.Vertices.First_Index; Last : Vertex_Index renames Graph.Vertices.Last_Index; G : Vertex_Arrays.Vector renames Graph.Vertices; P : Path (1 .. Integer (Last - First + 1)); K : Positive := 1; -- ie P_Last type H_Row is array (G.First_Index .. G.Last_Index) of Vertex_Index'Base; H : array (G.First_Index .. G.Last_Index) of H_Row := (others => (others => Invalid_Vertex)); Next_Vertex_Found : Boolean; Result : Path_Arrays.Vector; function Contains (P : in Path; V : in Vertex_Index) return Boolean is (for some N of P => N.Vertex = V); function Contains (Row : in H_Row; V : in Vertex_Index) return Boolean is (for some N of Row => N = V); function Contains (Edges : in Edge_Lists.List; ID : in Edge_ID) return Boolean is (for some E of Edges => E.ID = ID); procedure Add_Alternate_Edges (P : in out Path) is function Dec (I : in Positive) return Positive is (if I = P'First then P'Last else I - 1); begin for I in P'Range loop for New_Edge of G (P (Dec (I)).Vertex) loop if New_Edge.Vertex_B = P (I).Vertex and (not Contains (P (I).Edges, New_Edge.ID)) then P (I).Edges.Append ((New_Edge.ID, New_Edge.Data)); end if; end loop; end loop; end Add_Alternate_Edges; begin P (1) := (First, Edge_Lists.Empty_List); All_Initial_Vertices : loop Explore_Vertex : loop Path_Extension : loop -- EC2 Path Extension Next_Vertex_Found := False; Find_Next_Vertex : for Edge of G (P (K).Vertex) loop declare Next_Vertex : constant Vertex_Index := Edge.Vertex_B; -- ie G[P[k],j] begin if Next_Vertex > P (1).Vertex and -- (1) (not Contains (P, Next_Vertex)) and -- (2) (not Contains (H (P (K).Vertex), Next_Vertex)) then K := K + 1; P (K) := (Next_Vertex, +(Edge.ID, Edge.Data)); Next_Vertex_Found := True; exit Find_Next_Vertex; end if; end; end loop Find_Next_Vertex; exit Path_Extension when not Next_Vertex_Found; end loop Path_Extension; -- EC3 Circuit Confirmation for Edge of G (P (K).Vertex) loop if Edge.Vertex_B = P (1).Vertex then P (1).Edges := +(Edge.ID, Edge.Data); if Graph.Multigraph then Add_Alternate_Edges (P (1 .. K)); end if; Result.Append (P (1 .. K)); exit; end if; end loop; -- EC4 Vertex Closure exit Explore_Vertex when K = 1; H (P (K).Vertex) := (others => Invalid_Vertex); for M in H (P (K - 1).Vertex)'Range loop if H (P (K - 1).Vertex)(M) = Invalid_Vertex then H (P (K - 1).Vertex)(M) := P (K).Vertex; P (K) := (Invalid_Vertex, Edge_Lists.Empty_List); exit; end if; end loop; K := K - 1; end loop Explore_Vertex; -- EC5 Advance Initial Index exit All_Initial_Vertices when P (1).Vertex = Graph.Vertices.Last_Index; P (1) := (P (1).Vertex + 1, Edge_Lists.Empty_List); pragma Assert (K = 1); H := (others => (others => Invalid_Vertex)); end loop All_Initial_Vertices; -- EC6 Terminate return Result; end Find_Cycles_Tiernan; function Find_Cycles (Graph : in Gen_Graphs.Graph) return Path_Arrays.Vector is -- Implements Circuit-Finding Algorithm from [3] use all type Ada.Containers.Count_Type; pragma Warnings (Off, """Edited_Graph"" is not modified, could be declared constant"); Edited_Graph : Gen_Graphs.Graph := Graph; Result : Path_Arrays.Vector; A_K : Adjacency_Structures.Vector; B : Adjacency_Structures.Vector; Blocked : array (Graph.Vertices.First_Index .. Graph.Vertices.Last_Index) of Boolean := (others => False); Stack : Vertex_Stacks.Stack; S : Vertex_Index := Graph.Vertices.First_Index; Dummy : Boolean; pragma Unreferenced (Dummy); function Circuit (V : in Vertex_Index) return Boolean is F : Boolean := False; procedure Unblock (U : in Vertex_Index) is begin Blocked (U) := False; declare use Vertex_Lists; Cur : Cursor := B (U).First; Temp : Cursor; W : Vertex_Index; begin loop exit when not Has_Element (Cur); W := Element (Cur); Temp := Cur; Next (Cur); B (U).Delete (Temp); if Blocked (W) then Unblock (W); end if; end loop; end; end Unblock; procedure Add_Result is Cycle : Path (1 .. Integer (Stack.Depth)); begin for I in 1 .. Stack.Depth loop Cycle (Integer (Stack.Depth - I + 1)) := (Stack.Peek (I), Edge_Lists.Empty_List); -- We add the edge info later, after finding all the cycles. end loop; Result.Append (Cycle); if Trace > 0 then Ada.Text_IO.Put_Line ("cycle " & Image (Cycle)); end if; end Add_Result; begin if Trace > 0 then Ada.Text_IO.Put_Line ("circuit start" & V'Image); end if; Stack.Push (V); Blocked (V) := True; if V in A_K.First_Index .. A_K.Last_Index then for W of A_K (V) loop if W = S then Add_Result; F := True; elsif not Blocked (W) then if Circuit (W) then F := True; end if; end if; end loop; end if; if F then Unblock (V); else if V in A_K.First_Index .. A_K.Last_Index then for W of A_K (V) loop if (for all V1 of B (W) => V /= V1) then B (W).Append (V); end if; end loop; end if; end if; Stack.Pop; if Trace > 0 then Ada.Text_IO.Put_Line ("circuit finish" & V'Image); end if; return F; end Circuit; begin -- [3] restricts the graph to not have loops (edge v-v) or multiple -- edges between two nodes. So we first delete any such edges. Delete_Loops_Multigraph : for V in Edited_Graph.Vertices.First_Index .. Edited_Graph.Vertices.Last_Index loop declare use Edge_Node_Lists; Cur : Cursor := Edited_Graph.Vertices (V).First; Temp : Cursor; Found_Loop : Boolean := False; begin loop exit when not Has_Element (Cur); if Element (Cur).Vertex_B = V then if not Found_Loop then -- This is a cycle we want in the result. Edge data is added to all -- cycles later. Result.Append (Path'(1 => (V, Edge_Lists.Empty_List))); Found_Loop := True; end if; Temp := Cur; Next (Cur); Edited_Graph.Vertices (V).Delete (Temp); elsif Element (Cur).Multigraph then -- These will be added back from Graph after we find all cycles. Temp := Cur; Next (Cur); Edited_Graph.Vertices (V).Delete (Temp); else Next (Cur); end if; end loop; end; end loop Delete_Loops_Multigraph; B.Set_First_Last (Graph.Vertices.First_Index, Graph.Vertices.Last_Index); -- Start of body of Circuit-Finding Algorithm from [3] loop exit when S = Graph.Vertices.Last_Index; declare use Component_Lists; Subgraph : Adjacency_Structures.Vector; Components : Component_Lists.List; Cur : Component_Lists.Cursor; Least_Vertex_Cur : Component_Lists.Cursor; Least_Vertex_V : Vertex_Index := Vertex_Index'Last; function Delete_Edges (Edges : in Edge_Node_Lists.List) return Vertex_Lists.List is begin return Result : Vertex_Lists.List do for Edge of Edges loop if Edge.Vertex_B >= S then Result.Append (Edge.Vertex_B); end if; end loop; end return; end Delete_Edges; begin Subgraph.Set_First_Last (S, Edited_Graph.Vertices.Last_Index); for V in S .. Edited_Graph.Vertices.Last_Index loop Subgraph (V) := Delete_Edges (Edited_Graph.Vertices (V)); end loop; Components := Strongly_Connected_Components (Subgraph, Non_Trivial_Only => True); Cur := Components.First; loop exit when not Has_Element (Cur); if Element (Cur).Length > 1 then declare Comp : Vertex_Lists.List renames Components.Constant_Reference (Cur); begin for W of Comp loop if W < Least_Vertex_V then Least_Vertex_Cur := Cur; Least_Vertex_V := W; end if; end loop; end; end if; Next (Cur); end loop; A_K.Clear; if Has_Element (Least_Vertex_Cur) then declare Component : Vertex_Lists.List renames Components (Least_Vertex_Cur); Min : Vertex_Index := Vertex_Index'Last; Max : Vertex_Index := Vertex_Index'First; begin if Trace > 0 then Ada.Text_IO.Put_Line ("strong component " & Least_Vertex_V'Image); Ada.Text_IO.Put_Line (Image (Component)); end if; for V of Component loop if Min > V then Min := V; end if; if Max < V then Max := V; end if; end loop; A_K.Set_First_Last (Min, Max); for V of Component loop for Edge of Edited_Graph.Vertices (V) loop A_K (V).Append (Edge.Vertex_B); end loop; end loop; end; end if; end; if A_K.Length > 0 then S := A_K.First_Index; for I in A_K.First_Index .. A_K.Last_Index loop Blocked (I) := False; B (I).Clear; end loop; Dummy := Circuit (S); S := S + 1; else S := Graph.Vertices.Last_Index; end if; end loop; -- Add edge data. for Cycle of Result loop for I in Cycle'First .. Cycle'Last loop declare Prev_I : constant Positive := (if I = Cycle'First then Cycle'Last else I - 1); begin for Edge of Graph.Vertices (Cycle (Prev_I).Vertex) loop if Cycle (I).Vertex = Edge.Vertex_B then Cycle (I).Edges.Append ((Edge.ID, Edge.Data)); end if; end loop; end; end loop; end loop; return Result; end Find_Cycles; function Loops (Graph : in Gen_Graphs.Graph) return Vertex_Lists.List is begin return Result : Vertex_Lists.List do for V in Graph.Vertices.First_Index .. Graph.Vertices.Last_Index loop for Edge of Graph.Vertices (V) loop if V = Edge.Vertex_B then Result.Append (V); exit; end if; end loop; end loop; end return; end Loops; function To_Adjancency (Graph : in Gen_Graphs.Graph) return Adjacency_Structures.Vector is function To_Vertex_List (Edges : in Edge_Node_Lists.List) return Vertex_Lists.List is begin return Result : Vertex_Lists.List do for Edge of Edges loop Result.Append (Edge.Vertex_B); end loop; end return; end To_Vertex_List; begin return Result : Adjacency_Structures.Vector do Result.Set_First_Last (Graph.Vertices.First_Index, Graph.Vertices.Last_Index); for V in Graph.Vertices.First_Index .. Graph.Vertices.Last_Index loop Result (V) := To_Vertex_List (Graph.Vertices (V)); end loop; end return; end To_Adjancency; function Strongly_Connected_Components (Graph : in Adjacency_Structures.Vector; Non_Trivial_Only : in Boolean := False) return Component_Lists.List is -- Implements [4] section 4. Low_Link : array (Graph.First_Index .. Graph.Last_Index) of Vertex_Index'Base := (others => Invalid_Vertex); Number : array (Graph.First_Index .. Graph.Last_Index) of Vertex_Index'Base := (others => Invalid_Vertex); -- Number is the order visited in the depth-first search. Points : Vertex_Stacks.Stack; I : Vertex_Index'Base := Graph.First_Index - 1; Result : Component_Lists.List; procedure Strong_Connect (V : in Vertex_Index) is begin I := I + 1; Number (V) := I; Low_Link (V) := I; Points.Push (V); for W of Graph (V) loop if Number (W) = Invalid_Vertex then -- (v, w) is a tree arc Strong_Connect (W); Low_Link (V) := Vertex_Index'Min (Low_Link (V), Low_Link (W)); elsif Number (W) < Number (V) then -- (v, w) is a frond or cross-link if (for some P of Points => P = W) then Low_Link (V) := Vertex_Index'Min (Low_Link (V), Low_Link (W)); end if; end if; end loop; if Low_Link (V) = Number (V) then -- v is the root of a component declare use all type Ada.Containers.Count_Type; Component : Vertex_Lists.List; begin while (not Points.Is_Empty) and then Number (Points.Peek) >= Number (V) loop Component.Append (Points.Pop); end loop; if (not Non_Trivial_Only) or Component.Length > 1 then Result.Append (Component); end if; end; end if; end Strong_Connect; begin for W in Graph.First_Index .. Graph.Last_Index loop if Number (W) = Invalid_Vertex then Strong_Connect (W); end if; end loop; return Result; end Strongly_Connected_Components; end SAL.Gen_Graphs;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2014, 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 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 is the parent package for a library of useful units provided with GNAT package GNAT is pragma Pure; end GNAT;
with gel.Joint, gel.Sprite, physics.Joint.DoF6, physics.Joint.Ball, physics.Space; package gel.ball_Joint -- -- Allows sprites to be connected via a 'ball and socket' joint. -- is type Item is new gel.Joint.item with private; type View is access all Item'Class; type Views is array (math.Index range <>) of View; Sway : constant Joint.Degree_of_freedom := 1; -- TODO: Can we use an enumeration here ? Heave : constant Joint.Degree_of_freedom := 2; Surge : constant Joint.Degree_of_freedom := 3; Pitch : constant Joint.Degree_of_freedom := 4; Yaw : constant Joint.Degree_of_freedom := 5; Roll : constant Joint.Degree_of_freedom := 6; package std_physics renames standard.Physics; use Math; ---------- --- Forge -- procedure define (Self : access Item; in_Space : in std_physics.Space.view; Sprite_A, Sprite_B : access gel.Sprite.item'Class; Pivot_in_A, Pivot_in_B : in Vector_3); overriding procedure destroy (Self : in out Item); -------------- -- Attributes -- overriding function Physics (Self : in Item) return gel.joint.Physics_view; overriding function Frame_A (Self : in Item) return Matrix_4x4; overriding function Frame_B (Self : in Item) return Matrix_4x4; overriding procedure Frame_A_is (Self : in out Item; Now : in Matrix_4x4); overriding procedure Frame_B_is (Self : in out Item; Now : in Matrix_4x4); overriding function Degrees_of_freedom (Self : in Item) return joint.Degree_of_freedom; ---------- --- Bounds - limits the range of motion for a degree of freedom. -- overriding function is_Bound (Self : in Item; for_Degree : in joint.Degree_of_freedom) return Boolean; overriding function low_Bound (Self : access Item; for_Degree : in joint.Degree_of_freedom) return Real; overriding procedure low_Bound_is (Self : access Item; for_Degree : in joint.Degree_of_freedom; Now : in Real); overriding function high_Bound (Self : access Item; for_Degree : in joint.Degree_of_freedom) return Real; overriding procedure high_Bound_is (Self : access Item; for_Degree : in joint.Degree_of_freedom; Now : in Real); overriding function Extent (Self : in Item; for_Degree : in joint.Degree_of_freedom) return Real; overriding procedure Velocity_is (Self : in Item; for_Degree : in joint.Degree_of_freedom; Now : in Real); -------------- --- Operations -- -- Nil. private type physics_DoF6_Joint_view is access all std_physics.Joint.DoF6.item'Class; type Item is new GEL.Joint.item with record Physics : access std_physics.Joint.ball.item'Class; end record; end gel.ball_Joint;
No-one has translated the psenvsub example into Ada yet. Be the first to create psenvsub in Ada and get one free Internet! If you're the author of the Ada binding, this is a great way to get people to use 0MQ in Ada. To submit a new translation email it to zeromq-dev@lists.zeromq.org. Please: * Stick to identical functionality and naming used in examples so that readers can easily compare languages. * You MUST place your name as author in the examples so readers can contact you. * You MUST state in the email that you license your code under the MIT/X11 license. Subscribe to this list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
with Interfaces; with Atomic.Unsigned; package Atomic.Unsigned_32 is new Atomic.Unsigned (Interfaces.Unsigned_32);
pragma Ada_2012; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; -- with Pixtend.arm_linux_gnueabihf_bits_stdint_uintn_h; package Pixtend.pixtend_h is type pixtOut is record byDigOut : aliased unsigned_char; -- pixtend.h:36 byRelayOut : aliased unsigned_char; -- pixtend.h:37 byGpioOut : aliased unsigned_char; -- pixtend.h:38 wPwm0 : aliased unsigned_short; -- pixtend.h:39 wPwm1 : aliased unsigned_short; -- pixtend.h:40 byPwm0Ctrl0 : aliased unsigned_char; -- pixtend.h:41 byPwm0Ctrl1 : aliased unsigned_char; -- pixtend.h:42 byPwm0Ctrl2 : aliased unsigned_char; -- pixtend.h:43 byGpioCtrl : aliased unsigned_char; -- pixtend.h:44 byUcCtrl : aliased unsigned_char; -- pixtend.h:45 byAiCtrl0 : aliased unsigned_char; -- pixtend.h:46 byAiCtrl1 : aliased unsigned_char; -- pixtend.h:47 byPiStatus : aliased unsigned_char; -- pixtend.h:48 byAux0 : aliased unsigned_char; -- pixtend.h:49 end record with Convention => C_Pass_By_Copy; -- pixtend.h:35 type anon1799_array1800 is array (0 .. 31) of aliased unsigned_char; type pixtOutV2S is record byModelOut : aliased unsigned_char; -- pixtend.h:53 byUCMode : aliased unsigned_char; -- pixtend.h:54 byUCCtrl0 : aliased unsigned_char; -- pixtend.h:55 byUCCtrl1 : aliased unsigned_char; -- pixtend.h:56 byDigitalInDebounce01 : aliased unsigned_char; -- pixtend.h:57 byDigitalInDebounce23 : aliased unsigned_char; -- pixtend.h:58 byDigitalInDebounce45 : aliased unsigned_char; -- pixtend.h:59 byDigitalInDebounce67 : aliased unsigned_char; -- pixtend.h:60 byDigitalOut : aliased unsigned_char; -- pixtend.h:61 byRelayOut : aliased unsigned_char; -- pixtend.h:62 byGPIOCtrl : aliased unsigned_char; -- pixtend.h:63 byGPIOOut : aliased unsigned_char; -- pixtend.h:64 byGPIODebounce01 : aliased unsigned_char; -- pixtend.h:65 byGPIODebounce23 : aliased unsigned_char; -- pixtend.h:66 byPWM0Ctrl0 : aliased unsigned_char; -- pixtend.h:67 wPWM0Ctrl1 : aliased unsigned_short; -- pixtend.h:68 wPWM0A : aliased unsigned_short; -- pixtend.h:69 wPWM0B : aliased unsigned_short; -- pixtend.h:70 byPWM1Ctrl0 : aliased unsigned_char; -- pixtend.h:71 byPWM1Ctrl1 : aliased unsigned_char; -- pixtend.h:72 byPWM1A : aliased unsigned_char; -- pixtend.h:73 byPWM1B : aliased unsigned_char; -- pixtend.h:74 byJumper10V : aliased unsigned_char; -- pixtend.h:75 byGPIO0Dht11 : aliased unsigned_char; -- pixtend.h:76 byGPIO1Dht11 : aliased unsigned_char; -- pixtend.h:77 byGPIO2Dht11 : aliased unsigned_char; -- pixtend.h:78 byGPIO3Dht11 : aliased unsigned_char; -- pixtend.h:79 abyRetainDataOut : aliased anon1799_array1800; -- pixtend.h:80 end record with Convention => C_Pass_By_Copy; -- pixtend.h:52 type anon1802_array1804 is array (0 .. 63) of aliased unsigned_char; type pixtOutV2L is record byModelOut : aliased unsigned_char; -- pixtend.h:84 byUCMode : aliased unsigned_char; -- pixtend.h:85 byUCCtrl0 : aliased unsigned_char; -- pixtend.h:86 byUCCtrl1 : aliased unsigned_char; -- pixtend.h:87 byDigitalInDebounce01 : aliased unsigned_char; -- pixtend.h:88 byDigitalInDebounce23 : aliased unsigned_char; -- pixtend.h:89 byDigitalInDebounce45 : aliased unsigned_char; -- pixtend.h:90 byDigitalInDebounce67 : aliased unsigned_char; -- pixtend.h:91 byDigitalInDebounce89 : aliased unsigned_char; -- pixtend.h:92 byDigitalInDebounce1011 : aliased unsigned_char; -- pixtend.h:93 byDigitalInDebounce1213 : aliased unsigned_char; -- pixtend.h:94 byDigitalInDebounce1415 : aliased unsigned_char; -- pixtend.h:95 byDigitalOut0 : aliased unsigned_char; -- pixtend.h:96 byDigitalOut1 : aliased unsigned_char; -- pixtend.h:97 byRelayOut : aliased unsigned_char; -- pixtend.h:98 byGPIOCtrl : aliased unsigned_char; -- pixtend.h:99 byGPIOOut : aliased unsigned_char; -- pixtend.h:100 byGPIODebounce01 : aliased unsigned_char; -- pixtend.h:101 byGPIODebounce23 : aliased unsigned_char; -- pixtend.h:102 byPWM0Ctrl0 : aliased unsigned_char; -- pixtend.h:103 wPWM0Ctrl1 : aliased unsigned_short; -- pixtend.h:104 wPWM0A : aliased unsigned_short; -- pixtend.h:105 wPWM0B : aliased unsigned_short; -- pixtend.h:106 byPWM1Ctrl0 : aliased unsigned_char; -- pixtend.h:107 wPWM1Ctrl1 : aliased unsigned_short; -- pixtend.h:108 wPWM1A : aliased unsigned_short; -- pixtend.h:109 wPWM1B : aliased unsigned_short; -- pixtend.h:110 byPWM2Ctrl0 : aliased unsigned_char; -- pixtend.h:111 wPWM2Ctrl1 : aliased unsigned_short; -- pixtend.h:112 wPWM2A : aliased unsigned_short; -- pixtend.h:113 wPWM2B : aliased unsigned_short; -- pixtend.h:114 byJumper10V : aliased unsigned_char; -- pixtend.h:115 byGPIO0Dht11 : aliased unsigned_char; -- pixtend.h:116 byGPIO1Dht11 : aliased unsigned_char; -- pixtend.h:117 byGPIO2Dht11 : aliased unsigned_char; -- pixtend.h:118 byGPIO3Dht11 : aliased unsigned_char; -- pixtend.h:119 abyRetainDataOut : aliased anon1802_array1804; -- pixtend.h:120 end record with Convention => C_Pass_By_Copy; -- pixtend.h:83 type pixtOutDAC is record wAOut0 : aliased unsigned_short; -- pixtend.h:124 wAOut1 : aliased unsigned_short; -- pixtend.h:125 end record with Convention => C_Pass_By_Copy; -- pixtend.h:123 type pixtIn is record byDigIn : aliased unsigned_char; -- pixtend.h:129 wAi0 : aliased unsigned_short; -- pixtend.h:130 wAi1 : aliased unsigned_short; -- pixtend.h:131 wAi2 : aliased unsigned_short; -- pixtend.h:132 wAi3 : aliased unsigned_short; -- pixtend.h:133 byGpioIn : aliased unsigned_char; -- pixtend.h:134 wTemp0 : aliased unsigned_short; -- pixtend.h:135 wTemp1 : aliased unsigned_short; -- pixtend.h:136 wTemp2 : aliased unsigned_short; -- pixtend.h:137 wTemp3 : aliased unsigned_short; -- pixtend.h:138 wHumid0 : aliased unsigned_short; -- pixtend.h:139 wHumid1 : aliased unsigned_short; -- pixtend.h:140 wHumid2 : aliased unsigned_short; -- pixtend.h:141 wHumid3 : aliased unsigned_short; -- pixtend.h:142 byUcVersionL : aliased unsigned_char; -- pixtend.h:143 byUcVersionH : aliased unsigned_char; -- pixtend.h:144 byUcStatus : aliased unsigned_char; -- pixtend.h:145 rAi0 : aliased float; -- pixtend.h:146 rAi1 : aliased float; -- pixtend.h:147 rAi2 : aliased float; -- pixtend.h:148 rAi3 : aliased float; -- pixtend.h:149 rTemp0 : aliased float; -- pixtend.h:150 rTemp1 : aliased float; -- pixtend.h:151 rTemp2 : aliased float; -- pixtend.h:152 rTemp3 : aliased float; -- pixtend.h:153 rHumid0 : aliased float; -- pixtend.h:154 rHumid1 : aliased float; -- pixtend.h:155 rHumid2 : aliased float; -- pixtend.h:156 rHumid3 : aliased float; -- pixtend.h:157 end record with Convention => C_Pass_By_Copy; -- pixtend.h:128 type anon1808_array1800 is array (0 .. 31) of aliased unsigned_char; type pixtInV2S is record byFirmware : aliased unsigned_char; -- pixtend.h:161 byHardware : aliased unsigned_char; -- pixtend.h:162 byModelIn : aliased unsigned_char; -- pixtend.h:163 byUCState : aliased unsigned_char; -- pixtend.h:164 byUCWarnings : aliased unsigned_char; -- pixtend.h:165 byDigitalIn : aliased unsigned_char; -- pixtend.h:166 wAnalogIn0 : aliased unsigned_short; -- pixtend.h:167 wAnalogIn1 : aliased unsigned_short; -- pixtend.h:168 byGPIOIn : aliased unsigned_char; -- pixtend.h:169 wTemp0 : aliased unsigned_short; -- pixtend.h:170 byTemp0Error : aliased unsigned_char; -- pixtend.h:171 wTemp1 : aliased unsigned_short; -- pixtend.h:172 byTemp1Error : aliased unsigned_char; -- pixtend.h:173 wTemp2 : aliased unsigned_short; -- pixtend.h:174 byTemp2Error : aliased unsigned_char; -- pixtend.h:175 wTemp3 : aliased unsigned_short; -- pixtend.h:176 byTemp3Error : aliased unsigned_char; -- pixtend.h:177 wHumid0 : aliased unsigned_short; -- pixtend.h:178 wHumid1 : aliased unsigned_short; -- pixtend.h:179 wHumid2 : aliased unsigned_short; -- pixtend.h:180 wHumid3 : aliased unsigned_short; -- pixtend.h:181 rAnalogIn0 : aliased float; -- pixtend.h:182 rAnalogIn1 : aliased float; -- pixtend.h:183 rTemp0 : aliased float; -- pixtend.h:184 rTemp1 : aliased float; -- pixtend.h:185 rTemp2 : aliased float; -- pixtend.h:186 rTemp3 : aliased float; -- pixtend.h:187 rHumid0 : aliased float; -- pixtend.h:188 rHumid1 : aliased float; -- pixtend.h:189 rHumid2 : aliased float; -- pixtend.h:190 rHumid3 : aliased float; -- pixtend.h:191 abyRetainDataIn : aliased anon1808_array1800; -- pixtend.h:192 end record with Convention => C_Pass_By_Copy; -- pixtend.h:160 type anon1809_array1804 is array (0 .. 63) of aliased unsigned_char; type pixtInV2L is record byFirmware : aliased unsigned_char; -- pixtend.h:196 byHardware : aliased unsigned_char; -- pixtend.h:197 byModelIn : aliased unsigned_char; -- pixtend.h:198 byUCState : aliased unsigned_char; -- pixtend.h:199 byUCWarnings : aliased unsigned_char; -- pixtend.h:200 byDigitalIn0 : aliased unsigned_char; -- pixtend.h:201 byDigitalIn1 : aliased unsigned_char; -- pixtend.h:202 wAnalogIn0 : aliased unsigned_short; -- pixtend.h:203 wAnalogIn1 : aliased unsigned_short; -- pixtend.h:204 wAnalogIn2 : aliased unsigned_short; -- pixtend.h:205 wAnalogIn3 : aliased unsigned_short; -- pixtend.h:206 wAnalogIn4 : aliased unsigned_short; -- pixtend.h:207 wAnalogIn5 : aliased unsigned_short; -- pixtend.h:208 byGPIOIn : aliased unsigned_char; -- pixtend.h:209 wTemp0 : aliased unsigned_short; -- pixtend.h:210 byTemp0Error : aliased unsigned_char; -- pixtend.h:211 wTemp1 : aliased unsigned_short; -- pixtend.h:212 byTemp1Error : aliased unsigned_char; -- pixtend.h:213 wTemp2 : aliased unsigned_short; -- pixtend.h:214 byTemp2Error : aliased unsigned_char; -- pixtend.h:215 wTemp3 : aliased unsigned_short; -- pixtend.h:216 byTemp3Error : aliased unsigned_char; -- pixtend.h:217 wHumid0 : aliased unsigned_short; -- pixtend.h:218 wHumid1 : aliased unsigned_short; -- pixtend.h:219 wHumid2 : aliased unsigned_short; -- pixtend.h:220 wHumid3 : aliased unsigned_short; -- pixtend.h:221 rAnalogIn0 : aliased float; -- pixtend.h:222 rAnalogIn1 : aliased float; -- pixtend.h:223 rAnalogIn2 : aliased float; -- pixtend.h:224 rAnalogIn3 : aliased float; -- pixtend.h:225 rAnalogIn4 : aliased float; -- pixtend.h:226 rAnalogIn5 : aliased float; -- pixtend.h:227 rTemp0 : aliased float; -- pixtend.h:228 rTemp1 : aliased float; -- pixtend.h:229 rTemp2 : aliased float; -- pixtend.h:230 rTemp3 : aliased float; -- pixtend.h:231 rHumid0 : aliased float; -- pixtend.h:232 rHumid1 : aliased float; -- pixtend.h:233 rHumid2 : aliased float; -- pixtend.h:234 rHumid3 : aliased float; -- pixtend.h:235 abyRetainDataIn : aliased anon1809_array1804; -- pixtend.h:236 end record with Convention => C_Pass_By_Copy; -- pixtend.h:195 function crc16_calc (crc : unsigned_short; data : unsigned_char) return unsigned_short -- pixtend.h:239 with Import => True, Convention => C, External_Name => "crc16_calc"; function Spi_AutoMode (OutputData : access pixtOut; InputData : access pixtIn) return int -- pixtend.h:240 with Import => True, Convention => C, External_Name => "Spi_AutoMode"; function Spi_AutoModeV2S (OutputData : access pixtOutV2S; InputData : access pixtInV2S) return int -- pixtend.h:241 with Import => True, Convention => C, External_Name => "Spi_AutoModeV2S"; function Spi_AutoModeV2L (OutputData : access pixtOutV2L; InputData : access pixtInV2L) return int -- pixtend.h:242 with Import => True, Convention => C, External_Name => "Spi_AutoModeV2L"; function Spi_AutoModeDAC (OutputDataDAC : access pixtOutDAC) return int -- pixtend.h:243 with Import => True, Convention => C, External_Name => "Spi_AutoModeDAC"; function Spi_Set_Dout (value : int) return int -- pixtend.h:244 with Import => True, Convention => C, External_Name => "Spi_Set_Dout"; function Spi_Get_Dout return unsigned_char -- pixtend.h:245 with Import => True, Convention => C, External_Name => "Spi_Get_Dout"; function Spi_Get_Din return int -- pixtend.h:246 with Import => True, Convention => C, External_Name => "Spi_Get_Din"; function Spi_Get_Ain (Idx : int) return unsigned_short -- pixtend.h:247 with Import => True, Convention => C, External_Name => "Spi_Get_Ain"; function Spi_Set_Aout (channel : int; value : unsigned_short) return int -- pixtend.h:248 with Import => True, Convention => C, External_Name => "Spi_Set_Aout"; function Spi_Set_Relays (value : int) return int -- pixtend.h:249 with Import => True, Convention => C, External_Name => "Spi_Set_Relays"; function Spi_Get_Relays return unsigned_char -- pixtend.h:250 with Import => True, Convention => C, External_Name => "Spi_Get_Relays"; function Spi_Get_Temp (Idx : int) return unsigned_short -- pixtend.h:251 with Import => True, Convention => C, External_Name => "Spi_Get_Temp"; function Spi_Get_Hum (Idx : int) return unsigned_short -- pixtend.h:252 with Import => True, Convention => C, External_Name => "Spi_Get_Hum"; function Spi_Set_Servo (channel : int; value : int) return int -- pixtend.h:253 with Import => True, Convention => C, External_Name => "Spi_Set_Servo"; function Spi_Set_Pwm (channel : int; value : unsigned_short) return int -- pixtend.h:254 with Import => True, Convention => C, External_Name => "Spi_Set_Pwm"; function Spi_Set_PwmControl (value0 : int; value1 : int; value2 : int) return int -- pixtend.h:255 with Import => True, Convention => C, External_Name => "Spi_Set_PwmControl"; function Spi_Set_GpioControl (value : int) return int -- pixtend.h:256 with Import => True, Convention => C, External_Name => "Spi_Set_GpioControl"; function Spi_Set_UcControl (value : int) return int -- pixtend.h:257 with Import => True, Convention => C, External_Name => "Spi_Set_UcControl"; function Spi_Set_AiControl (value0 : int; value1 : int) return int -- pixtend.h:258 with Import => True, Convention => C, External_Name => "Spi_Set_AiControl"; function Spi_Set_RaspStat (value : int) return int -- pixtend.h:259 with Import => True, Convention => C, External_Name => "Spi_Set_RaspStat"; function Spi_Setup (spi_device : int) return int -- pixtend.h:260 with Import => True, Convention => C, External_Name => "Spi_Setup"; function Spi_SetupV2 (spi_device : int) return int -- pixtend.h:261 with Import => True, Convention => C, External_Name => "Spi_SetupV2"; function Spi_uC_Reset return int -- pixtend.h:262 with Import => True, Convention => C, External_Name => "Spi_uC_Reset"; function Spi_Get_uC_Status return int -- pixtend.h:263 with Import => True, Convention => C, External_Name => "Spi_Get_uC_Status"; function Spi_Get_uC_Version return unsigned_short -- pixtend.h:264 with Import => True, Convention => C, External_Name => "Spi_Get_uC_Version"; function Change_Gpio_Mode (pin : char; mode : char) return int -- pixtend.h:265 with Import => True, Convention => C, External_Name => "Change_Gpio_Mode"; function Change_Serial_Mode (mode : unsigned_char) return int -- pixtend.h:266 with Import => True, Convention => C, External_Name => "Change_Serial_Mode"; function Spi_Set_Gpio (value : int) return int -- pixtend.h:267 with Import => True, Convention => C, External_Name => "Spi_Set_Gpio"; function Spi_Get_Gpio return int -- pixtend.h:268 with Import => True, Convention => C, External_Name => "Spi_Get_Gpio"; end Pixtend.pixtend_h;
with STM32_SVD; use STM32_SVD; with STM32_SVD.NVIC; use STM32_SVD.NVIC; with STM32_SVD.SCB; use STM32_SVD.SCB; with STM32_SVD.PWR; use STM32_SVD.PWR; with STM32_SVD.EXTI; use STM32_SVD.EXTI; with STM32_SVD.RCC; use STM32_SVD.RCC; with STM32_SVD.RTC; use STM32_SVD.RTC; package body STM32GD.RTC is Days_Per_Month : constant array (0 .. 12) of Natural := ( 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); procedure Unlock is begin RTC_Periph.WPR.KEY := 16#CA#; RTC_Periph.WPR.KEY := 16#53#; end Unlock; procedure Lock is begin RTC_Periph.WPR.KEY := 16#FF#; end Lock; procedure Read (Date_Time : out Date_Time_Type) is begin Date_Time.Day := Natural(RTC_Periph.DR.DU) + Natural(RTC_Periph.DR.DT) * 10; Date_Time.Month := Natural(RTC_Periph.DR.MU) + Natural(RTC_Periph.DR.MT) * 10; Date_Time.Year := Natural(RTC_Periph.DR.YU) + Natural(RTC_Periph.DR.YT) * 10; Date_Time.Hour := Natural(RTC_Periph.TR.HU) + Natural(RTC_Periph.TR.HT) * 10; Date_Time.Minute := Natural(RTC_Periph.TR.MNU) + Natural(RTC_Periph.TR.MNT) * 10; Date_Time.Second := Natural(RTC_Periph.TR.SU) + Natural(RTC_Periph.TR.ST) * 10; end Read; procedure Print (Date_Time : Date_Time_Type) is begin -- Put (Integer'Image (Date_Time.Year)); -- Put (Integer'Image (Date_Time.Month)); -- Put (Integer'Image (Date_Time.Day)); -- Put (Integer'Image (Date_Time.Hour)); -- Put (Integer'Image (Date_Time.Minute)); -- Put_Line (Integer'Image (Date_Time.Second)); null; end Print; procedure Add_Seconds (Date_Time : in out Date_Time_Type ; Second_Delta : Second_Delta_Type) is Total_Seconds : Natural; begin Total_Seconds := Date_Time.Second + Date_Time.Minute * 60 + Date_Time.Hour * 60 * 60 + Second_Delta; Date_Time.Second := Total_Seconds mod 60; Date_Time.Minute := Total_Seconds mod (60 * 60) / 60; Date_Time.Hour := Total_Seconds / 3600; if Total_Seconds / (60 * 60) > Hour_Type'Last then Total_Seconds := Total_Seconds - Hour_Type'Last * (60 * 60); end if; Date_Time.Hour := Total_Seconds / (60 * 60); end Add_Seconds; procedure Add_Minutes (Date_Time : in out Date_Time_Type ; Minute_Delta : Minute_Delta_Type) is Total_Minutes : Natural; begin Total_Minutes := Date_Time.Minute + Date_Time.Hour * 60 + Minute_Delta; Date_Time.Minute := Total_Minutes mod 60; if Total_Minutes / 60 > Hour_Type'Last then Total_Minutes := Total_Minutes - Hour_Type'Last * 60; end if; Date_Time.Hour := Total_Minutes / 60; end Add_Minutes; procedure Set_Alarm (Date_Time : Date_Time_Type) is begin Unlock; RTC_Periph.ISR.ALRAF := 0; RTC_Periph.CR.ALRAE := 0; while RTC_Periph.ISR.ALRAWF = 0 loop null; end loop; RTC_Periph.ALRMAR := ( MSK1 => 0, ST => UInt3 (Date_Time.Second / 10), SU => UInt4 (Date_Time.Second mod 10), MSK2 => 0, MNT => UInt3 (Date_Time.Minute / 10), MNU => UInt4 (Date_Time.Minute mod 10), MSK3 => 0, PM => 0, HT => UInt2 (Date_Time.Hour / 10), HU => UInt4 (Date_Time.Hour mod 10), MSK4 => 1, WDSEL => 0, DT => 0, DU => 0); RTC_Periph.CR.ALRAE := 1; RTC_Periph.CR.ALRAIE := 1; Lock; EXTI_Periph.EMR.EM.Arr (17) := 1; EXTI_Periph.RTSR.RT.Arr (17) := 1; end Set_Alarm; procedure Clear_Alarm is ICPR : UInt32; begin ICPR := NVIC_Periph.ICPR; ICPR := ICPR or 2 ** 3; NVIC_Periph.ICPR := ICPR; EXTI_Periph.PR.PIF.Arr (17) := 1; Unlock; RTC_Periph.ISR.ALRAF := 0; RTC_Periph.CR.ALRAE := 0; RTC_Periph.CR.ALRAIE := 0; Lock; end Clear_Alarm; procedure Init is use STM32GD.Clock; begin RCC_Periph.APB1ENR.PWREN := 1; PWR_Periph.CR.DBP := 1; case Clock is when LSE => RCC_Periph.CSR.RTCSEL := 2#01#; pragma Compile_Time_Error (Clock = LSE and not Clock_Tree.LSE_Enabled, "LSE not enabled for RTC"); when LSI => RCC_Periph.CSR.RTCSEL := 2#10#; pragma Compile_Time_Error (Clock = LSI and not Clock_Tree.LSI_Enabled, "LSE not enabled for RTC"); when others => pragma Compile_Time_Error (Clock /= LSI and Clock /= LSE, "RTC clock needs to be LSI or LSE"); end case; RCC_Periph.CSR.RTCEN := 1; end Init; function To_Seconds (Date_Time : Date_Time_Type) return Natural is begin return Date_Time.Second + Date_Time.Minute * 60 + Date_Time.Hour * 60 * 60 + (Date_Time.Day - 1) * 24 * 60 * 60 + Days_Per_Month (Date_Time.Month - 1) * 24 * 60 * 60 + Date_Time.Year * 365 * 24 * 60 * 60; end To_Seconds; procedure Wait_For_Alarm is begin SCB.SCB_Periph.SCR.SEVEONPEND := 1; STM32GD.Wait_For_Event; Clear_Alarm; end Wait_For_Alarm; end STM32GD.RTC;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . W I D E _ T E X T _ I O . M O D U L A R _ I O -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2006, 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, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- ------------------------------------------------------------------------------ with Ada.Wide_Text_IO.Modular_Aux; with System.Unsigned_Types; use System.Unsigned_Types; with System.WCh_Con; use System.WCh_Con; with System.WCh_WtS; use System.WCh_WtS; package body Ada.Wide_Text_IO.Modular_IO is subtype TFT is Ada.Wide_Text_IO.File_Type; -- File type required for calls to routines in Aux package Aux renames Ada.Wide_Text_IO.Modular_Aux; --------- -- Get -- --------- procedure Get (File : File_Type; Item : out Num; Width : Field := 0) is begin if Num'Size > Unsigned'Size then Aux.Get_LLU (TFT (File), Long_Long_Unsigned (Item), Width); else Aux.Get_Uns (TFT (File), Unsigned (Item), Width); end if; exception when Constraint_Error => raise Data_Error; end Get; procedure Get (Item : out Num; Width : Field := 0) is begin Get (Current_Input, Item, Width); end Get; procedure Get (From : Wide_String; Item : out Num; Last : out Positive) is S : constant String := Wide_String_To_String (From, WCEM_Upper); -- String on which we do the actual conversion. Note that the method -- used for wide character encoding is irrelevant, since if there is -- a character outside the Standard.Character range then the call to -- Aux.Gets will raise Data_Error in any case. begin if Num'Size > Unsigned'Size then Aux.Gets_LLU (S, Long_Long_Unsigned (Item), Last); else Aux.Gets_Uns (S, Unsigned (Item), Last); end if; exception when Constraint_Error => raise Data_Error; end Get; --------- -- Put -- --------- procedure Put (File : File_Type; Item : Num; Width : Field := Default_Width; Base : Number_Base := Default_Base) is begin if Num'Size > Unsigned'Size then Aux.Put_LLU (TFT (File), Long_Long_Unsigned (Item), Width, Base); else Aux.Put_Uns (TFT (File), Unsigned (Item), Width, Base); end if; end Put; procedure Put (Item : Num; Width : Field := Default_Width; Base : Number_Base := Default_Base) is begin Put (Current_Output, Item, Width, Base); end Put; procedure Put (To : out Wide_String; Item : Num; Base : Number_Base := Default_Base) is S : String (To'First .. To'Last); begin if Num'Size > Unsigned'Size then Aux.Puts_LLU (S, Long_Long_Unsigned (Item), Base); else Aux.Puts_Uns (S, Unsigned (Item), Base); end if; for J in S'Range loop To (J) := Wide_Character'Val (Character'Pos (S (J))); end loop; end Put; end Ada.Wide_Text_IO.Modular_IO;
with Ada.Containers.Indefinite_Vectors, Ada.Text_IO; procedure Here_Doc is package String_Vec is new Ada.Containers.Indefinite_Vectors (Index_Type => Positive, Element_Type => String); use type String_Vec.Vector; Document: String_Vec.Vector := String_Vec.Empty_Vector & "This is a vector of strings with the following properties:" & " - indention is preserved, and" & " - a quotation mark '""' must be ""escaped"" by a double-quote '""""'."; begin Document := Document & "Have fun!"; for I in Document.First_Index .. Document.Last_Index loop Ada.Text_IO.Put_Line(Document.Element(I)); end loop; end Here_Doc;
-- C93008B.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 AFTER CREATION OF A TASK OBJECT BY AN ALLOCATOR, ANY -- OPERATION INVOLVING THE RESULT DELIVERED BY THE ALLOCATOR IS -- EXECUTED ONLY AFTER THE ACTIVATION OF THE TASK HAS COMPLETED. -- WEI 3/ 4/82 -- TBN 12/20/85 RENAMED FROM C930AJA-B.ADA. ADDED DELAY STATEMENT -- DURING TASK ACTIVATION. -- RJW 4/11/86 ADDED PACKAGE DUMMY. with Impdef; WITH REPORT; USE REPORT; PROCEDURE C93008B IS SUBTYPE ARG IS NATURAL RANGE 0..9; SPYNUMB : NATURAL := 0; FUNCTION FINIT_POS (DIGT: IN ARG) RETURN NATURAL IS BEGIN SPYNUMB := 10*SPYNUMB+DIGT; RETURN DIGT; END FINIT_POS; BEGIN TEST ("C93008B", "USE OF RESULT AFTER CREATION OF " & "A TASK BY ALLOCATOR"); BLOCK: DECLARE TASK TYPE TT1; TYPE ATT1 IS ACCESS TT1; TYPE ARRAY_ATT1 IS ARRAY (NATURAL RANGE 2 .. 3) OF ATT1; MY_ARRAY : ARRAY_ATT1; POINTER_TT1 : ATT1; TASK BODY TT1 IS PACKAGE DUMMY IS END DUMMY; PACKAGE BODY DUMMY IS BEGIN DELAY 2.0 * Impdef.One_Second; DECLARE IDUMMY1 : NATURAL := FINIT_POS (1); BEGIN NULL; END; END DUMMY; BEGIN NULL; END TT1; BEGIN MY_ARRAY := (2 => NEW TT1, 3 => NULL); -- TASK ACTIVATED NOW. POINTER_TT1 := MY_ARRAY (FINIT_POS (2)); MY_ARRAY (FINIT_POS (3)) := POINTER_TT1; IF SPYNUMB /= 123 THEN IF SPYNUMB = 132 OR SPYNUMB = 13 OR SPYNUMB = 12 OR SPYNUMB = 1 OR SPYNUMB = 0 THEN FAILED ("TASK ACTIVATION RIGHT IN TIME, " & "BUT OTHER ERROR"); ELSE FAILED ("RESULT OF ALLOCATOR ACCESSED BEFORE " & "TASK ACTIVATION HAS COMPLETED"); END IF; COMMENT ("ACTUAL ORDER WAS:" & INTEGER'IMAGE(SPYNUMB)); END IF; END BLOCK; RESULT; END C93008B;
with Tkmrpc.Types; with Tkmrpc.Operations.Ees; package Tkmrpc.Request.Ees.Esa_Expire is Data_Size : constant := 13; type Data_Type is record Sp_Id : Types.Sp_Id_Type; Spi_Rem : Types.Esp_Spi_Type; Protocol : Types.Protocol_Type; Hard : Types.Expiry_Flag_Type; end record; for Data_Type use record Sp_Id at 0 range 0 .. (4 * 8) - 1; Spi_Rem at 4 range 0 .. (4 * 8) - 1; Protocol at 8 range 0 .. (4 * 8) - 1; Hard at 12 range 0 .. (1 * 8) - 1; end record; for Data_Type'Size use Data_Size * 8; Padding_Size : constant := Request.Body_Size - Data_Size; subtype Padding_Range is Natural range 1 .. Padding_Size; subtype Padding_Type is Types.Byte_Sequence (Padding_Range); type Request_Type is record Header : Request.Header_Type; Data : Data_Type; Padding : Padding_Type; end record; for Request_Type use record Header at 0 range 0 .. (Request.Header_Size * 8) - 1; Data at Request.Header_Size range 0 .. (Data_Size * 8) - 1; Padding at Request.Header_Size + Data_Size range 0 .. (Padding_Size * 8) - 1; end record; for Request_Type'Size use Request.Request_Size * 8; Null_Request : constant Request_Type := Request_Type' (Header => Request.Header_Type'(Operation => Operations.Ees.Esa_Expire, Request_Id => 0), Data => Data_Type'(Sp_Id => Types.Sp_Id_Type'First, Spi_Rem => Types.Esp_Spi_Type'First, Protocol => Types.Protocol_Type'First, Hard => Types.Expiry_Flag_Type'First), Padding => Padding_Type'(others => 0)); end Tkmrpc.Request.Ees.Esa_Expire;
-- Copyright 2021 Jeff Foley. All rights reserved. -- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. name = "SpyOnWeb" type = "scrape" function start() set_rate_limit(2) end function horizontal(ctx, domain) local page, err = request(ctx, {url=build_url(domain)}) if (err ~= nil and err ~= "") then log(ctx, "horizontal request to service failed: " .. err) return end local pattern = "\"/go/([a-z0-9-]{2,63}[.][a-z]{2,3}([a-z]{2}|))\"" local matches = submatch(page, pattern) if (matches == nil or #matches == 0) then return end for i, match in pairs(matches) do if (match ~= nil and #match >= 2 and match[2] ~= "") then associated(ctx, domain, match[2]) end end end function build_url(domain) return "https://spyonweb.com/" .. domain end
with AdaM.Assist.Query.find_All.Metrics; with Ada.Wide_Text_IO; with Ada.Characters.Handling; with Ada.Exceptions; with Asis.Exceptions; with Asis.Errors; with Asis.Implementation, asis.Elements; separate (AdaM.Assist.Query.find_All.Actuals_for_traversing) procedure Post_Op (Element : Asis.Element; Control : in out Asis.Traverse_Control; State : in out Traversal_State) is pragma Unreferenced (Control); use Asis, asis.Elements; the_Declaration : constant asis.Declaration := asis.Declaration (Element); the_Kind : constant Asis.Declaration_Kinds := asis.Elements.Declaration_Kind (the_Declaration); begin if Is_Nil (State.ignore_Starter) then State.parent_Stack.delete_Last; -- Children no longer need to know their parent. else if Is_Equal (Element, State.ignore_Starter) then State.ignore_Starter := Nil_Element; end if; end if; if the_Kind = Asis.A_Package_Declaration then if not Metrics.current_Packages.Is_Empty then Metrics.current_Packages.delete_Last; -- Pop the current package stack. end if; end if; exception when Ex : Asis.Exceptions.ASIS_Inappropriate_Context | Asis.Exceptions.ASIS_Inappropriate_Container | Asis.Exceptions.ASIS_Inappropriate_Compilation_Unit | Asis.Exceptions.ASIS_Inappropriate_Element | Asis.Exceptions.ASIS_Inappropriate_Line | Asis.Exceptions.ASIS_Inappropriate_Line_Number | Asis.Exceptions.ASIS_Failed => Ada.Wide_Text_IO.Put ("Post_Op : ASIS exception ("); Ada.Wide_Text_IO.Put (Ada.Characters.Handling.To_Wide_String ( Ada.Exceptions.Exception_Name (Ex))); Ada.Wide_Text_IO.Put (") is raised"); Ada.Wide_Text_IO.New_Line; Ada.Wide_Text_IO.Put ("ASIS Error Status is "); Ada.Wide_Text_IO.Put (Asis.Errors.Error_Kinds'Wide_Image (Asis.Implementation.Status)); Ada.Wide_Text_IO.New_Line; Ada.Wide_Text_IO.Put ("ASIS Diagnosis is "); Ada.Wide_Text_IO.New_Line; Ada.Wide_Text_IO.Put (Asis.Implementation.Diagnosis); Ada.Wide_Text_IO.New_Line; Asis.Implementation.Set_Status; when Ex : others => Ada.Wide_Text_IO.Put ("Post_Op : "); Ada.Wide_Text_IO.Put (Ada.Characters.Handling.To_Wide_String ( Ada.Exceptions.Exception_Name (Ex))); Ada.Wide_Text_IO.Put (" is raised ("); Ada.Wide_Text_IO.Put (Ada.Characters.Handling.To_Wide_String ( Ada.Exceptions.Exception_Information (Ex))); Ada.Wide_Text_IO.Put (")"); Ada.Wide_Text_IO.New_Line; end Post_Op;
-- Copyright 2013-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 Pck is procedure Put(S : String) is begin null; end Put; end Pck;
with Ada.Numerics.Elementary_Functions; with Ada.Calendar.Formatting; with Ada.Calendar.Time_Zones; with SDL.Video.Windows.Makers; with SDL.Video.Renderers.Makers; with SDL.Events.Events; procedure Draw_A_Clock is use Ada.Calendar; use Ada.Calendar.Formatting; Window : SDL.Video.Windows.Window; Renderer : SDL.Video.Renderers.Renderer; Event : SDL.Events.Events.Events; Offset : Time_Zones.Time_Offset; procedure Draw_Clock (Stamp : Time) is use SDL.C; use Ada.Numerics.Elementary_Functions; Radi : constant array (0 .. 59) of int := (0 | 15 | 30 | 45 => 2, 5 | 10 | 20 | 25 | 35 | 40 | 50 | 55 => 1, others => 0); Diam : constant array (0 .. 59) of int := (0 | 15 | 30 | 45 => 5, 5 | 10 | 20 | 25 | 35 | 40 | 50 | 55 => 3, others => 1); Width : constant int := Window.Get_Surface.Size.Width; Height : constant int := Window.Get_Surface.Size.Height; Radius : constant Float := Float (int'Min (Width, Height)); R_1 : constant Float := 0.48 * Radius; R_2 : constant Float := 0.35 * Radius; R_3 : constant Float := 0.45 * Radius; R_4 : constant Float := 0.47 * Radius; Hour : constant Hour_Number := Formatting.Hour (Stamp, Offset); Minute : constant Minute_Number := Formatting.Minute (Stamp, Offset); Second : constant Second_Number := Formatting.Second (Stamp); function To_X (A : Float; R : Float) return int is (Width / 2 + int (R * Sin (A, 60.0))); function To_Y (A : Float; R : Float) return int is (Height / 2 - int (R * Cos (A, 60.0))); begin SDL.Video.Renderers.Makers.Create (Renderer, Window.Get_Surface); Renderer.Set_Draw_Colour ((0, 0, 150, 255)); Renderer.Fill (Rectangle => (0, 0, Width, Height)); Renderer.Set_Draw_Colour ((200, 200, 200, 255)); for A in 0 .. 59 loop Renderer.Fill (Rectangle => (To_X (Float (A), R_1) - Radi (A), To_Y (Float (A), R_1) - Radi (A), Diam (A), Diam (A))); end loop; Renderer.Set_Draw_Colour ((200, 200, 0, 255)); Renderer.Draw (Line => ((Width / 2, Height / 2), (To_X (5.0 * (Float (Hour) + Float (Minute) / 60.0), R_2), To_Y (5.0 * (Float (Hour) + Float (Minute) / 60.0), R_2)))); Renderer.Draw (Line => ((Width / 2, Height / 2), (To_X (Float (Minute) + Float (Second) / 60.0, R_3), To_Y (Float (Minute) + Float (Second) / 60.0, R_3)))); Renderer.Set_Draw_Colour ((220, 0, 0, 255)); Renderer.Draw (Line => ((Width / 2, Height / 2), (To_X (Float (Second), R_4), To_Y (Float (Second), R_4)))); Renderer.Fill (Rectangle => (Width / 2 - 3, Height / 2 - 3, 7, 7)); end Draw_Clock; function Poll_Quit return Boolean is use type SDL.Events.Event_Types; begin while SDL.Events.Events.Poll (Event) loop if Event.Common.Event_Type = SDL.Events.Quit then return True; end if; end loop; return False; end Poll_Quit; begin Offset := Time_Zones.UTC_Time_Offset; if not SDL.Initialise (Flags => SDL.Enable_Screen) then return; end if; SDL.Video.Windows.Makers.Create (Win => Window, Title => "Draw a clock", Position => SDL.Natural_Coordinates'(X => 10, Y => 10), Size => SDL.Positive_Sizes'(300, 300), Flags => SDL.Video.Windows.Resizable); loop Draw_Clock (Clock); Window.Update_Surface; delay 0.200; exit when Poll_Quit; end loop; Window.Finalize; SDL.Finalise; end Draw_A_Clock;
----------------------------------------------------------------------- -- gen-generator -- Code Generator -- Copyright (C) 2009, 2010, 2011, 2012, 2013, 2015, 2018 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; with Ada.Command_Line; with Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Hash; with Ada.Containers.Hashed_Maps; with Util.Beans.Objects; with Util.Properties; with ASF.Applications.Main; with ASF.Contexts.Faces; with ASF.Servlets; with Gen.Model.Packages; with Gen.Model.Projects; with Gen.Artifacts.Hibernate; with Gen.Artifacts.Query; with Gen.Artifacts.Mappings; with Gen.Artifacts.Distribs; with Gen.Artifacts.XMI; with Gen.Artifacts.Yaml; package Gen.Generator is package UBO renames Util.Beans.Objects; -- A fatal error that prevents the generator to proceed has occurred. Fatal_Error : exception; G_URI : constant String := "http://code.google.com/p/ada-ado/generator"; type Package_Type is (PACKAGE_MODEL, PACKAGE_FORMS); type Mapping_File is record Path : UString; Output : Ada.Text_IO.File_Type; end record; type Handler is new ASF.Applications.Main.Application and Gen.Artifacts.Generator with private; -- Initialize the generator procedure Initialize (H : in out Handler; Config_Dir : in UString; Debug : in Boolean); -- Get the configuration properties. function Get_Properties (H : in Handler) return Util.Properties.Manager; -- Report an error and set the exit status accordingly procedure Error (H : in out Handler; Message : in String; Arg1 : in String; Arg2 : in String := ""); overriding procedure Error (H : in out Handler; Message : in String); -- Report an info message. procedure Info (H : in out Handler; Message : in String; Arg1 : in String := ""; Arg2 : in String := ""; Arg3 : in String := ""); -- Read the XML package file procedure Read_Package (H : in out Handler; File : in String); -- Read the model mapping types and initialize the hibernate artifact. procedure Read_Mappings (H : in out Handler); -- Read the XML model file procedure Read_Model (H : in out Handler; File : in String; Silent : in Boolean); -- Read the model and query files stored in the application directory <b>db</b>. procedure Read_Models (H : in out Handler; Dirname : in String); -- Read the XML project file. When <b>Recursive</b> is set, read the GNAT project -- files used by the main project and load all the <b>dynamo.xml</b> files defined -- by these project. procedure Read_Project (H : in out Handler; File : in String; Recursive : in Boolean := False); -- Prepare the model by checking, verifying and initializing it after it is completely known. procedure Prepare (H : in out Handler); -- Finish the generation. Some artifacts could generate other files that take into -- account files generated previously. procedure Finish (H : in out Handler); -- Tell the generator to activate the generation of the given template name. -- The name is a property name that must be defined in generator.properties to -- indicate the template file. Several artifacts can trigger the generation -- of a given template. The template is generated only once. procedure Add_Generation (H : in out Handler; Name : in String; Mode : in Gen.Artifacts.Iteration_Mode; Mapping : in String); -- Enable the generation of the Ada package given by the name. By default all the Ada -- packages found in the model are generated. When called, this enables the generation -- only for the Ada packages registered here. procedure Enable_Package_Generation (H : in out Handler; Name : in String); -- Save the content generated by the template generator. procedure Save_Content (H : in out Handler; File : in String; Content : in UString); -- Generate the code using the template file procedure Generate (H : in out Handler; Mode : in Gen.Artifacts.Iteration_Mode; File : in String; Save : not null access procedure (H : in out Handler; File : in String; Content : in UString)); -- Generate the code using the template file procedure Generate (H : in out Handler; File : in String; Model : in Gen.Model.Definition_Access; Save : not null access procedure (H : in out Handler; File : in String; Content : in UString)); -- Generate all the code for the templates activated through <b>Add_Generation</b>. procedure Generate_All (H : in out Handler); -- Generate all the code generation files stored in the directory procedure Generate_All (H : in out Handler; Mode : in Gen.Artifacts.Iteration_Mode; Name : in String); -- Set the directory where template files are stored. procedure Set_Template_Directory (H : in out Handler; Path : in UString); -- Set the directory where results files are generated. procedure Set_Result_Directory (H : in out Handler; Path : in String); -- Get the result directory path. function Get_Result_Directory (H : in Handler) return String; -- Get the project plugin directory path. function Get_Plugin_Directory (H : in Handler) return String; -- Get the config directory path. function Get_Config_Directory (H : in Handler) return String; -- Get the dynamo installation directory path. function Get_Install_Directory (H : in Handler) return String; -- Return the search directories that the AWA application can use to find files. -- The search directories is built by using the project dependencies. function Get_Search_Directories (H : in Handler) return String; -- Get the exit status -- Returns 0 if the generation was successful -- Returns 1 if there was a generation error function Get_Status (H : in Handler) return Ada.Command_Line.Exit_Status; -- Get the configuration parameter. function Get_Parameter (H : in Handler; Name : in String; Default : in String := "") return String; -- Get the configuration parameter. function Get_Parameter (H : in Handler; Name : in String; Default : in Boolean := False) return Boolean; -- Set the force-save file mode. When False, if the generated file exists already, -- an error message is reported. procedure Set_Force_Save (H : in out Handler; To : in Boolean); -- Set the project name. procedure Set_Project_Name (H : in out Handler; Name : in String); -- Get the project name. function Get_Project_Name (H : in Handler) return String; -- Set the project property. procedure Set_Project_Property (H : in out Handler; Name : in String; Value : in String); -- Get the project property identified by the given name. If the project property -- does not exist, returns the default value. Project properties are loaded -- by <b>Read_Project</b>. function Get_Project_Property (H : in Handler; Name : in String; Default : in String := "") return String; -- Save the project description and parameters. procedure Save_Project (H : in out Handler); -- Get the path of the last generated file. function Get_Generated_File (H : in Handler) return String; -- Update the project model through the <b>Process</b> procedure. procedure Update_Project (H : in out Handler; Process : not null access procedure (P : in out Model.Projects.Root_Project_Definition)); -- Scan the dynamo directories and execute the <b>Process</b> procedure with the -- directory path. procedure Scan_Directories (H : in Handler; Process : not null access procedure (Dir : in String)); private use Ada.Strings.Unbounded; use Gen.Artifacts; type Template_Context is record Mode : Gen.Artifacts.Iteration_Mode; Mapping : UString; end record; package Template_Map is new Ada.Containers.Hashed_Maps (Key_Type => UString, Element_Type => Template_Context, Hash => Ada.Strings.Unbounded.Hash, Equivalent_Keys => "="); type Object_Access is access all UBO.Object; type Handler is new ASF.Applications.Main.Application and Gen.Artifacts.Generator with record Conf : ASF.Applications.Config; -- Config directory. Config_Dir : UString; -- Output base directory. Output_Dir : UString; Model : aliased Gen.Model.Packages.Model_Definition; Status : Ada.Command_Line.Exit_Status := 0; -- The file that must be saved (the file attribute in <f:view>. File : Object_Access; -- Indicates whether the file must be saved at each generation or only once. -- This is the mode attribute in <f:view>. Mode : Object_Access; -- Indicates whether the file must be ignored after the generation. -- This is the ignore attribute in <f:view>. It is intended to be used for the package -- body generation to skip that in some cases when it turns out there is no operation. Ignore : Object_Access; -- Whether the AdaMappings.xml file was loaded or not. Type_Mapping_Loaded : Boolean := False; -- The root project document. Project : aliased Gen.Model.Projects.Root_Project_Definition; -- Hibernate XML artifact Hibernate : Gen.Artifacts.Hibernate.Artifact; -- Query generation artifact. Query : Gen.Artifacts.Query.Artifact; -- Type mapping artifact. Mappings : Gen.Artifacts.Mappings.Artifact; -- The distribution artifact. Distrib : Gen.Artifacts.Distribs.Artifact; -- Ada generation from UML-XMI models. XMI : Gen.Artifacts.XMI.Artifact; -- Yaml model files support. Yaml : Gen.Artifacts.Yaml.Artifact; -- The list of templates that must be generated. Templates : Template_Map.Map; -- Force the saving of a generated file, even if a file already exist. Force_Save : Boolean := True; -- A fake servlet for template evaluation. Servlet : ASF.Servlets.Servlet_Access; end record; -- Execute the lifecycle phases on the faces context. overriding procedure Execute_Lifecycle (App : in Handler; Context : in out ASF.Contexts.Faces.Faces_Context'Class); end Gen.Generator;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.STRINGS.BOUNDED.HASH_CASE_INSENSITIVE -- -- -- -- S p e c -- -- -- -- Copyright (C) 2011, 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. -- -- -- -- -- -- -- -- -- -- -- -- 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.Containers; generic with package Bounded is new Ada.Strings.Bounded.Generic_Bounded_Length (<>); function Ada.Strings.Bounded.Hash_Case_Insensitive (Key : Bounded.Bounded_String) return Containers.Hash_Type; pragma Preelaborate (Ada.Strings.Bounded.Hash_Case_Insensitive);
with AUnit.Test_Suites; use AUnit.Test_Suites; package AOC_Test_Suite is function Suite return Access_Test_Suite; end AOC_Test_Suite;
with Word_List; with Ada.Containers.Vectors; package Decipherer is type Encrypted_Char is new Character; type Encrypted_Word is Array(Positive range 1 .. Word_List.Word'Last) of Encrypted_Char; type Candidate_Set is Array(Positive range <>) of Encrypted_Word; -- A mapping from the encrypted character to its partner. If the character is not in -- the input set, it will map to a period. type Result_Set is Array(Encrypted_Char range 'a' .. 'z') of Character; package Result_Vectors is new Ada.Containers.Vectors(Index_Type => Positive, Element_Type => Result_Set); subtype Result_Vector is Result_Vectors.Vector; function Image(ew: Encrypted_Word) return Word_List.Word; function Decipher(candidates: Candidate_Set; words: Word_List.Word_List) return Result_Vector; end Decipherer;
with Tarmi.Symbols; use Tarmi.Symbols; with Tarmi.Combiners; use Tarmi.Combiners; package body Tarmi.Evaluation is function Eval (Form : Datum; Env : Environment) return Datum is Form_L : Datum := Form; Env_L : Environment := Env; begin Tail_Eval: loop if Form_L.all in Pair_R then declare Operator : Datum := Pair(Form_L).First; Comb : Combiner := Combiner (Eval (Operator, Env_L)); -- may raise exception Operand_Tree : Datum := Pair(Form_L).Second; begin if Comb.all in Operative_R then declare Oper : Operative := Operative (Comb); C_Env : Environment := Child_Environment (Oper.Static_Env); begin Match_Bind (C_Env, Oper.Param_Tree_Formals, Operand_Tree); Bind (C_Env, Oper.Dyn_Env_Formal, Datum (Env_L)); Env_L := C_Env; Form_L := Oper.Body_Form; -- Tail-Eval the body in the extended environment end; else -- Applicative declare function Eval_Ops (Ops : Datum) return Datum is begin if Ops.all in Pair_R then return new Pair_R'(Eval (Pair(Ops).First, Env_L), Eval_Ops (Pair(Ops).Second)); elsif Ops = Nil then return Nil; else -- TODO: some error, not a proper list, Kernel Language violation raise Constraint_Error; end if; end Eval_Ops; begin -- TODO: Make more efficient by not allocating a new pair. Form_L := new Pair_R'(Datum (Applicative(Comb).Underlying), Eval_Ops (Operand_Tree)); -- Tail-Eval the derived form in same environment end; end if; end; elsif Form_L.all in Symbol_R then return Lookup (Symbol (Form_L), Env_L); else return Form_L; end if; end loop Tail_Eval; end Eval; end Tarmi.Evaluation;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . A D D R E S S _ O P E R A T I O N S -- -- -- -- S p e c -- -- -- -- Copyright (C) 2004-2005 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 implementation dependent sections of this file. -- -- -- -- 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 was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This package provides arithmetic and logical operations on type Address. -- It is intended for use by other packages in the System hierarchy. For -- applications requiring this capability, see System.Storage_Elements or -- the operations introduced in System.Aux_DEC; -- The reason we need this package is that arithmetic operations may not -- be available in the case where type Address is non-private and the -- operations have been made abstract in the spec of System (to avoid -- inappropriate use by applications programs). In addition, the logical -- operations may not be available if type Address is a signed integer. package System.Address_Operations is pragma Pure; -- The semantics of the arithmetic operations are those that apply to -- a modular type with the same length as Address, i.e. they provide -- twos complement wrap around arithmetic treating the address value -- as an unsigned value, with no overflow checking. -- Note that we do not use the infix names for these operations to -- avoid problems with ambiguities coming from declarations in package -- Standard (which may or may not be visible depending on the exact -- form of the declaration of type System.Address). function AddA (Left, Right : Address) return Address; function SubA (Left, Right : Address) return Address; function MulA (Left, Right : Address) return Address; function DivA (Left, Right : Address) return Address; function ModA (Left, Right : Address) return Address; -- The semantics of the logical operations are those that apply to -- a modular type with the same length as Address, i.e. they provide -- bit-wise operations on all bits of the value (including the sign -- bit if Address is a signed integer type). function AndA (Left, Right : Address) return Address; function OrA (Left, Right : Address) return Address; pragma Inline_Always (AddA); pragma Inline_Always (SubA); pragma Inline_Always (MulA); pragma Inline_Always (DivA); pragma Inline_Always (ModA); pragma Inline_Always (AndA); pragma Inline_Always (OrA); end System.Address_Operations;
<?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>dct_2d</name> <ret_bitwidth>0</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>9</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>in_block_0</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>in_block[0]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</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>in_block_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[1]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</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>in_block_2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[2]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</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>in_block_3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[3]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_5"> <Value> <Obj> <type>1</type> <id>5</id> <name>in_block_4</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[4]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_6"> <Value> <Obj> <type>1</type> <id>6</id> <name>in_block_5</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[5]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_7"> <Value> <Obj> <type>1</type> <id>7</id> <name>in_block_6</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[6]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_8"> <Value> <Obj> <type>1</type> <id>8</id> <name>in_block_7</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>in_block[7]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>0</direction> <if_type>1</if_type> <array_size>8</array_size> <bit_vecs> <count>0</count> <item_version>0</item_version> </bit_vecs> </item> <item class_id_reference="3" object_id="_9"> <Value> <Obj> <type>1</type> <id>9</id> <name>out_block</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>out_block</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <direction>1</direction> <if_type>1</if_type> <array_size>64</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>99</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_10"> <Value> <Obj> <type>0</type> <id>18</id> <name>row_outbuf</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> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>156</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>1</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>19</id> <name>col_outbuf</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> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>157</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>2</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>20</id> <name>col_inbuf_0</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</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>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[0]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>158</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>3</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>col_inbuf_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[1]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>159</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="_14"> <Value> <Obj> <type>0</type> <id>22</id> <name>col_inbuf_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[2]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>160</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>5</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>23</id> <name>col_inbuf_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[3]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>161</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>6</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>24</id> <name>col_inbuf_4</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[4]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>162</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>7</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>25</id> <name>col_inbuf_5</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[5]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>163</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>8</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>26</id> <name>col_inbuf_6</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[6]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>164</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>9</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>27</id> <name>col_inbuf_7</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>71</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>71</second> </item> </second> </item> </inlineStackInfo> <originalName>col_inbuf[7]</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>16</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>165</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>10</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>28</id> <name>_ln76</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>76</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>166</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.73</m_delay> <m_topoIndex>11</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>30</id> <name>i_0</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>168</item> <item>169</item> <item>170</item> <item>171</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>12</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>31</id> <name>icmp_ln76</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>76</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>172</item> <item>174</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.72</m_delay> <m_topoIndex>13</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>33</id> <name>i</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>76</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>175</item> <item>177</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.80</m_delay> <m_topoIndex>14</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>34</id> <name>_ln76</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>76</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>178</item> <item>179</item> <item>180</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>15</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>37</id> <name>_ln77</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>77</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>77</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>20</count> <item_version>0</item_version> <item>183</item> <item>184</item> <item>185</item> <item>186</item> <item>187</item> <item>188</item> <item>189</item> <item>190</item> <item>191</item> <item>192</item> <item>193</item> <item>194</item> <item>401</item> <item>402</item> <item>403</item> <item>404</item> <item>405</item> <item>406</item> <item>407</item> <item>408</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>16</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>38</id> <name>_ln76</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>76</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>76</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>195</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>18</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>40</id> <name>_ln81</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</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>181</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.73</m_delay> <m_topoIndex>17</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>42</id> <name>indvar_flatten</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>196</item> <item>197</item> <item>199</item> <item>200</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>19</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>43</id> <name>j_0</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>201</item> <item>202</item> <item>203</item> <item>204</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>20</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>44</id> <name>i_1</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>205</item> <item>206</item> <item>207</item> <item>208</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>21</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>45</id> <name>icmp_ln81</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</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>209</item> <item>211</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.71</m_delay> <m_topoIndex>22</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>46</id> <name>add_ln81</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>212</item> <item>214</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.85</m_delay> <m_topoIndex>23</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>47</id> <name>_ln81</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</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>215</item> <item>216</item> <item>217</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="_34"> <Value> <Obj> <type>0</type> <id>49</id> <name>j</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>81</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>81</second> </item> </second> </item> </inlineStackInfo> <originalName>j</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>222</item> <item>223</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.80</m_delay> <m_topoIndex>25</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>52</id> <name>icmp_ln83</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>83</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>83</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>224</item> <item>225</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.72</m_delay> <m_topoIndex>26</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>53</id> <name>select_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>226</item> <item>227</item> <item>228</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.18</m_delay> <m_topoIndex>27</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>54</id> <name>select_ln84_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>229</item> <item>230</item> <item>231</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.18</m_delay> <m_topoIndex>28</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>55</id> <name>zext_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>232</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>39</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>56</id> <name>zext_ln84_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>233</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>29</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>60</id> <name>tmp</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>235</item> <item>236</item> <item>238</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>30</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>61</id> <name>zext_ln84_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>239</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>31</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>62</id> <name>add_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>240</item> <item>241</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.85</m_delay> <m_topoIndex>32</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>63</id> <name>zext_ln84_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>242</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="_44"> <Value> <Obj> <type>0</type> <id>64</id> <name>row_outbuf_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>243</item> <item>245</item> <item>246</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>34</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>65</id> <name>row_outbuf_load</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>247</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.29</m_delay> <m_topoIndex>35</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>66</id> <name>trunc_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>248</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>36</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>67</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>16</count> <item_version>0</item_version> <item>249</item> <item>250</item> <item>251</item> <item>252</item> <item>254</item> <item>255</item> <item>257</item> <item>258</item> <item>260</item> <item>261</item> <item>263</item> <item>264</item> <item>266</item> <item>267</item> <item>269</item> <item>270</item> </oprand_edges> <opcode>switch</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.72</m_delay> <m_topoIndex>37</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>69</id> <name>col_inbuf_6_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>389</item> <item>390</item> <item>391</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>40</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>70</id> <name>col_inbuf_6_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>392</item> <item>393</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.73</m_delay> <m_topoIndex>41</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>71</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>394</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>42</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>73</id> <name>col_inbuf_5_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>383</item> <item>384</item> <item>385</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>43</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>74</id> <name>col_inbuf_5_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>386</item> <item>387</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.73</m_delay> <m_topoIndex>44</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>75</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>388</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>45</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>77</id> <name>col_inbuf_4_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>377</item> <item>378</item> <item>379</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>46</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>78</id> <name>col_inbuf_4_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>380</item> <item>381</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.73</m_delay> <m_topoIndex>47</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>79</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>382</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>48</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>81</id> <name>col_inbuf_3_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>371</item> <item>372</item> <item>373</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>49</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>82</id> <name>col_inbuf_3_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>374</item> <item>375</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.73</m_delay> <m_topoIndex>50</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>83</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>376</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>51</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>85</id> <name>col_inbuf_2_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>365</item> <item>366</item> <item>367</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>52</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>86</id> <name>col_inbuf_2_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>368</item> <item>369</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.73</m_delay> <m_topoIndex>53</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>87</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>370</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>54</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>89</id> <name>col_inbuf_1_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>359</item> <item>360</item> <item>361</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>55</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>90</id> <name>col_inbuf_1_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>362</item> <item>363</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.73</m_delay> <m_topoIndex>56</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>91</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>364</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>57</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>93</id> <name>col_inbuf_0_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>353</item> <item>354</item> <item>355</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>58</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>94</id> <name>col_inbuf_0_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>356</item> <item>357</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.73</m_delay> <m_topoIndex>59</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>95</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>358</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>60</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>97</id> <name>col_inbuf_7_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>395</item> <item>396</item> <item>397</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>61</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>98</id> <name>col_inbuf_7_addr_write_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>398</item> <item>399</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.73</m_delay> <m_topoIndex>62</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>99</id> <name>_ln84</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>84</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>84</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>400</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>63</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>102</id> <name>i_5</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>83</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>83</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>219</item> <item>220</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.80</m_delay> <m_topoIndex>38</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>103</id> <name>_ln0</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>221</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>64</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>105</id> <name>_ln87</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>87</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>218</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.73</m_delay> <m_topoIndex>65</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>107</id> <name>i_2</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>271</item> <item>272</item> <item>273</item> <item>274</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>66</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_76"> <Value> <Obj> <type>0</type> <id>108</id> <name>icmp_ln87</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>87</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>275</item> <item>276</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.72</m_delay> <m_topoIndex>67</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_77"> <Value> <Obj> <type>0</type> <id>110</id> <name>i_4</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>87</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</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>0.80</m_delay> <m_topoIndex>68</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_78"> <Value> <Obj> <type>0</type> <id>111</id> <name>_ln87</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>87</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>279</item> <item>280</item> <item>281</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>69</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_79"> <Value> <Obj> <type>0</type> <id>114</id> <name>_ln88</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>88</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>88</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>20</count> <item_version>0</item_version> <item>283</item> <item>284</item> <item>285</item> <item>286</item> <item>287</item> <item>288</item> <item>289</item> <item>290</item> <item>291</item> <item>292</item> <item>293</item> <item>294</item> <item>409</item> <item>410</item> <item>411</item> <item>412</item> <item>413</item> <item>414</item> <item>415</item> <item>416</item> </oprand_edges> <opcode>call</opcode> <m_Display>0</m_Display> <m_isOnCriticalPath>0</m_isOnCriticalPath> <m_isLCDNode>0</m_isLCDNode> <m_isStartOfPath>0</m_isStartOfPath> <m_delay>0.73</m_delay> <m_topoIndex>70</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_80"> <Value> <Obj> <type>0</type> <id>115</id> <name>_ln87</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>87</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>87</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>295</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>72</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_81"> <Value> <Obj> <type>0</type> <id>117</id> <name>_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</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>282</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.73</m_delay> <m_topoIndex>71</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_82"> <Value> <Obj> <type>0</type> <id>119</id> <name>indvar_flatten19</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>296</item> <item>297</item> <item>298</item> <item>299</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>73</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_83"> <Value> <Obj> <type>0</type> <id>120</id> <name>j_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>300</item> <item>301</item> <item>302</item> <item>303</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>74</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_84"> <Value> <Obj> <type>0</type> <id>121</id> <name>i_3</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>304</item> <item>305</item> <item>306</item> <item>307</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>75</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_85"> <Value> <Obj> <type>0</type> <id>122</id> <name>icmp_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</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>308</item> <item>309</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.71</m_delay> <m_topoIndex>76</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_86"> <Value> <Obj> <type>0</type> <id>123</id> <name>add_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>310</item> <item>311</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.85</m_delay> <m_topoIndex>77</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_87"> <Value> <Obj> <type>0</type> <id>124</id> <name>_ln92</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</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>312</item> <item>313</item> <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>78</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_88"> <Value> <Obj> <type>0</type> <id>126</id> <name>j_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>92</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>92</second> </item> </second> </item> </inlineStackInfo> <originalName>j</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>315</item> <item>316</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.80</m_delay> <m_topoIndex>79</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_89"> <Value> <Obj> <type>0</type> <id>129</id> <name>icmp_ln94</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>94</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>94</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>317</item> <item>318</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.72</m_delay> <m_topoIndex>80</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_90"> <Value> <Obj> <type>0</type> <id>130</id> <name>select_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>319</item> <item>320</item> <item>321</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.18</m_delay> <m_topoIndex>81</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_91"> <Value> <Obj> <type>0</type> <id>131</id> <name>select_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>322</item> <item>323</item> <item>324</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.18</m_delay> <m_topoIndex>82</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_92"> <Value> <Obj> <type>0</type> <id>132</id> <name>zext_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>325</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>83</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_93"> <Value> <Obj> <type>0</type> <id>133</id> <name>tmp_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>326</item> <item>327</item> <item>328</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>91</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_94"> <Value> <Obj> <type>0</type> <id>134</id> <name>zext_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>329</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>92</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_95"> <Value> <Obj> <type>0</type> <id>138</id> <name>zext_ln95_2</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>330</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>93</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_96"> <Value> <Obj> <type>0</type> <id>139</id> <name>add_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>331</item> <item>332</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.85</m_delay> <m_topoIndex>94</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_97"> <Value> <Obj> <type>0</type> <id>140</id> <name>zext_ln95_3</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>333</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>95</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_98"> <Value> <Obj> <type>0</type> <id>141</id> <name>out_block_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>334</item> <item>335</item> <item>336</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>96</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_99"> <Value> <Obj> <type>0</type> <id>142</id> <name>tmp_6</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>337</item> <item>338</item> <item>339</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>84</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_100"> <Value> <Obj> <type>0</type> <id>143</id> <name>zext_ln95_4</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>340</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>85</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_101"> <Value> <Obj> <type>0</type> <id>144</id> <name>add_ln95_1</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>341</item> <item>342</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.85</m_delay> <m_topoIndex>86</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_102"> <Value> <Obj> <type>0</type> <id>145</id> <name>zext_ln95_5</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>343</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>87</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_103"> <Value> <Obj> <type>0</type> <id>146</id> <name>col_outbuf_addr</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>344</item> <item>345</item> <item>346</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>88</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_104"> <Value> <Obj> <type>0</type> <id>147</id> <name>col_outbuf_load</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>347</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.29</m_delay> <m_topoIndex>89</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_105"> <Value> <Obj> <type>0</type> <id>148</id> <name>out_block_addr_write_ln95</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>95</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>95</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>348</item> <item>349</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.29</m_delay> <m_topoIndex>97</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_106"> <Value> <Obj> <type>0</type> <id>150</id> <name>i_6</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>94</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>94</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>350</item> <item>351</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.80</m_delay> <m_topoIndex>90</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_107"> <Value> <Obj> <type>0</type> <id>151</id> <name>_ln0</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>352</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>98</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> <item class_id_reference="9" object_id="_108"> <Value> <Obj> <type>0</type> <id>153</id> <name>_ln96</name> <fileName>dct.cpp</fileName> <fileDirectory>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</fileDirectory> <lineNumber>96</lineNumber> <contextFuncName>dct_2d</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>dct.cpp</first> <second>dct_2d</second> </first> <second>96</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>99</m_topoIndex> <m_clusterGroupNumber>-1</m_clusterGroupNumber> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>16</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_109"> <Value> <Obj> <type>2</type> <id>155</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="_110"> <Value> <Obj> <type>2</type> <id>167</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>4</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_111"> <Value> <Obj> <type>2</type> <id>173</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>4</bitwidth> </Value> <const_type>0</const_type> <content>8</content> </item> <item class_id_reference="16" object_id="_112"> <Value> <Obj> <type>2</type> <id>176</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>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_113"> <Value> <Obj> <type>2</type> <id>182</id> <name>dct_1d</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> <const_type>6</const_type> <content>&lt;constant:dct_1d&gt;</content> </item> <item class_id_reference="16" object_id="_114"> <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>7</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_115"> <Value> <Obj> <type>2</type> <id>210</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>7</bitwidth> </Value> <const_type>0</const_type> <content>64</content> </item> <item class_id_reference="16" object_id="_116"> <Value> <Obj> <type>2</type> <id>213</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>7</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_117"> <Value> <Obj> <type>2</type> <id>237</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>3</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_118"> <Value> <Obj> <type>2</type> <id>244</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="_119"> <Value> <Obj> <type>2</type> <id>253</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>3</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_120"> <Value> <Obj> <type>2</type> <id>256</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>3</bitwidth> </Value> <const_type>0</const_type> <content>2</content> </item> <item class_id_reference="16" object_id="_121"> <Value> <Obj> <type>2</type> <id>259</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>3</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_122"> <Value> <Obj> <type>2</type> <id>262</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>3</bitwidth> </Value> <const_type>0</const_type> <content>4</content> </item> <item class_id_reference="16" object_id="_123"> <Value> <Obj> <type>2</type> <id>265</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>3</bitwidth> </Value> <const_type>0</const_type> <content>5</content> </item> <item class_id_reference="16" object_id="_124"> <Value> <Obj> <type>2</type> <id>268</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>3</bitwidth> </Value> <const_type>0</const_type> <content>6</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>22</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_125"> <Obj> <type>3</type> <id>29</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>11</count> <item_version>0</item_version> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <item>23</item> <item>24</item> <item>25</item> <item>26</item> <item>27</item> <item>28</item> </node_objs> </item> <item class_id_reference="18" object_id="_126"> <Obj> <type>3</type> <id>35</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>30</item> <item>31</item> <item>33</item> <item>34</item> </node_objs> </item> <item class_id_reference="18" object_id="_127"> <Obj> <type>3</type> <id>39</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>2</count> <item_version>0</item_version> <item>37</item> <item>38</item> </node_objs> </item> <item class_id_reference="18" object_id="_128"> <Obj> <type>3</type> <id>41</id> <name>.preheader2.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>1</count> <item_version>0</item_version> <item>40</item> </node_objs> </item> <item class_id_reference="18" object_id="_129"> <Obj> <type>3</type> <id>48</id> <name>.preheader2.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>6</count> <item_version>0</item_version> <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="_130"> <Obj> <type>3</type> <id>68</id> <name>Xpose_Row_Inner_Loop_begin</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>49</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>60</item> <item>61</item> <item>62</item> <item>63</item> <item>64</item> <item>65</item> <item>66</item> <item>67</item> </node_objs> </item> <item class_id_reference="18" object_id="_131"> <Obj> <type>3</type> <id>72</id> <name>branch6</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>3</count> <item_version>0</item_version> <item>69</item> <item>70</item> <item>71</item> </node_objs> </item> <item class_id_reference="18" object_id="_132"> <Obj> <type>3</type> <id>76</id> <name>branch5</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>3</count> <item_version>0</item_version> <item>73</item> <item>74</item> <item>75</item> </node_objs> </item> <item class_id_reference="18" object_id="_133"> <Obj> <type>3</type> <id>80</id> <name>branch4</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>3</count> <item_version>0</item_version> <item>77</item> <item>78</item> <item>79</item> </node_objs> </item> <item class_id_reference="18" object_id="_134"> <Obj> <type>3</type> <id>84</id> <name>branch3</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>3</count> <item_version>0</item_version> <item>81</item> <item>82</item> <item>83</item> </node_objs> </item> <item class_id_reference="18" object_id="_135"> <Obj> <type>3</type> <id>88</id> <name>branch2</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>3</count> <item_version>0</item_version> <item>85</item> <item>86</item> <item>87</item> </node_objs> </item> <item class_id_reference="18" object_id="_136"> <Obj> <type>3</type> <id>92</id> <name>branch1</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>3</count> <item_version>0</item_version> <item>89</item> <item>90</item> <item>91</item> </node_objs> </item> <item class_id_reference="18" object_id="_137"> <Obj> <type>3</type> <id>96</id> <name>branch0</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>3</count> <item_version>0</item_version> <item>93</item> <item>94</item> <item>95</item> </node_objs> </item> <item class_id_reference="18" object_id="_138"> <Obj> <type>3</type> <id>100</id> <name>branch7</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>3</count> <item_version>0</item_version> <item>97</item> <item>98</item> <item>99</item> </node_objs> </item> <item class_id_reference="18" object_id="_139"> <Obj> <type>3</type> <id>104</id> <name>Xpose_Row_Inner_Loop_end</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>2</count> <item_version>0</item_version> <item>102</item> <item>103</item> </node_objs> </item> <item class_id_reference="18" object_id="_140"> <Obj> <type>3</type> <id>106</id> <name>.preheader1.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>1</count> <item_version>0</item_version> <item>105</item> </node_objs> </item> <item class_id_reference="18" object_id="_141"> <Obj> <type>3</type> <id>112</id> <name>.preheader1</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>107</item> <item>108</item> <item>110</item> <item>111</item> </node_objs> </item> <item class_id_reference="18" object_id="_142"> <Obj> <type>3</type> <id>116</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>2</count> <item_version>0</item_version> <item>114</item> <item>115</item> </node_objs> </item> <item class_id_reference="18" object_id="_143"> <Obj> <type>3</type> <id>118</id> <name>.preheader.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>1</count> <item_version>0</item_version> <item>117</item> </node_objs> </item> <item class_id_reference="18" object_id="_144"> <Obj> <type>3</type> <id>125</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>6</count> <item_version>0</item_version> <item>119</item> <item>120</item> <item>121</item> <item>122</item> <item>123</item> <item>124</item> </node_objs> </item> <item class_id_reference="18" object_id="_145"> <Obj> <type>3</type> <id>152</id> <name>Xpose_Col_Inner_Loop</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>20</count> <item_version>0</item_version> <item>126</item> <item>129</item> <item>130</item> <item>131</item> <item>132</item> <item>133</item> <item>134</item> <item>138</item> <item>139</item> <item>140</item> <item>141</item> <item>142</item> <item>143</item> <item>144</item> <item>145</item> <item>146</item> <item>147</item> <item>148</item> <item>150</item> <item>151</item> </node_objs> </item> <item class_id_reference="18" object_id="_146"> <Obj> <type>3</type> <id>154</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>153</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>274</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_147"> <id>156</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>18</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_148"> <id>157</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>19</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_149"> <id>158</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>20</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_150"> <id>159</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>21</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_151"> <id>160</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>22</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_152"> <id>161</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>23</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_153"> <id>162</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>24</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_154"> <id>163</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>25</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_155"> <id>164</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>26</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_156"> <id>165</id> <edge_type>1</edge_type> <source_obj>155</source_obj> <sink_obj>27</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_157"> <id>166</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>28</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_158"> <id>168</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>30</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_159"> <id>169</id> <edge_type>2</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="_160"> <id>170</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>30</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_161"> <id>171</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>30</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_162"> <id>172</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_163"> <id>174</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>31</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_164"> <id>175</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="_165"> <id>177</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>33</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_166"> <id>178</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_167"> <id>179</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_168"> <id>180</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>34</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_169"> <id>181</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>40</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_170"> <id>183</id> <edge_type>1</edge_type> <source_obj>182</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_171"> <id>184</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_172"> <id>185</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_173"> <id>186</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_174"> <id>187</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_175"> <id>188</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_176"> <id>189</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_177"> <id>190</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_178"> <id>191</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_179"> <id>192</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_180"> <id>193</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_181"> <id>194</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_182"> <id>195</id> <edge_type>2</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="_183"> <id>196</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>42</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_184"> <id>197</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>42</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_185"> <id>199</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>42</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_186"> <id>200</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>42</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_187"> <id>201</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>43</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_188"> <id>202</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>43</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_189"> <id>203</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_190"> <id>204</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>43</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_191"> <id>205</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>44</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_192"> <id>206</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>44</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_193"> <id>207</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>44</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_194"> <id>208</id> <edge_type>2</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="_195"> <id>209</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_196"> <id>211</id> <edge_type>1</edge_type> <source_obj>210</source_obj> <sink_obj>45</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_197"> <id>212</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="_198"> <id>214</id> <edge_type>1</edge_type> <source_obj>213</source_obj> <sink_obj>46</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_199"> <id>215</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_200"> <id>216</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_201"> <id>217</id> <edge_type>2</edge_type> <source_obj>106</source_obj> <sink_obj>47</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_202"> <id>218</id> <edge_type>2</edge_type> <source_obj>112</source_obj> <sink_obj>105</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_203"> <id>219</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>102</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_204"> <id>220</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>102</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_205"> <id>221</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>103</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_206"> <id>222</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_207"> <id>223</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>49</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_208"> <id>224</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_209"> <id>225</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>52</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_210"> <id>226</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_211"> <id>227</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_212"> <id>228</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>53</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_213"> <id>229</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_214"> <id>230</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_215"> <id>231</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>54</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_216"> <id>232</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>55</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_217"> <id>233</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>56</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_218"> <id>236</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>60</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_219"> <id>238</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>60</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_220"> <id>239</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>61</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_221"> <id>240</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="_222"> <id>241</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>62</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_223"> <id>242</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="_224"> <id>243</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_225"> <id>245</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_226"> <id>246</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_227"> <id>247</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="_228"> <id>248</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>66</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_229"> <id>249</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="_230"> <id>250</id> <edge_type>2</edge_type> <source_obj>100</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_231"> <id>251</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_232"> <id>252</id> <edge_type>2</edge_type> <source_obj>96</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_233"> <id>254</id> <edge_type>1</edge_type> <source_obj>253</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_234"> <id>255</id> <edge_type>2</edge_type> <source_obj>92</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_235"> <id>257</id> <edge_type>1</edge_type> <source_obj>256</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_236"> <id>258</id> <edge_type>2</edge_type> <source_obj>88</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_237"> <id>260</id> <edge_type>1</edge_type> <source_obj>259</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_238"> <id>261</id> <edge_type>2</edge_type> <source_obj>84</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_239"> <id>263</id> <edge_type>1</edge_type> <source_obj>262</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_240"> <id>264</id> <edge_type>2</edge_type> <source_obj>80</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_241"> <id>266</id> <edge_type>1</edge_type> <source_obj>265</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_242"> <id>267</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_243"> <id>269</id> <edge_type>1</edge_type> <source_obj>268</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_244"> <id>270</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>67</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_245"> <id>271</id> <edge_type>1</edge_type> <source_obj>110</source_obj> <sink_obj>107</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_246"> <id>272</id> <edge_type>2</edge_type> <source_obj>116</source_obj> <sink_obj>107</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_247"> <id>273</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>107</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_248"> <id>274</id> <edge_type>2</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="_249"> <id>275</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="_250"> <id>276</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>108</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_251"> <id>277</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_252"> <id>278</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>110</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_253"> <id>279</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="_254"> <id>280</id> <edge_type>2</edge_type> <source_obj>116</source_obj> <sink_obj>111</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_255"> <id>281</id> <edge_type>2</edge_type> <source_obj>118</source_obj> <sink_obj>111</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_256"> <id>282</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>117</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_257"> <id>283</id> <edge_type>1</edge_type> <source_obj>182</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_258"> <id>284</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_259"> <id>285</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_260"> <id>286</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_261"> <id>287</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_262"> <id>288</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_263"> <id>289</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_264"> <id>290</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_265"> <id>291</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_266"> <id>292</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_267"> <id>293</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_268"> <id>294</id> <edge_type>1</edge_type> <source_obj>107</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_269"> <id>295</id> <edge_type>2</edge_type> <source_obj>112</source_obj> <sink_obj>115</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_270"> <id>296</id> <edge_type>1</edge_type> <source_obj>123</source_obj> <sink_obj>119</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_271"> <id>297</id> <edge_type>2</edge_type> <source_obj>152</source_obj> <sink_obj>119</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_272"> <id>298</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>119</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_273"> <id>299</id> <edge_type>2</edge_type> <source_obj>118</source_obj> <sink_obj>119</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_274"> <id>300</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>120</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_275"> <id>301</id> <edge_type>2</edge_type> <source_obj>152</source_obj> <sink_obj>120</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_276"> <id>302</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>120</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_277"> <id>303</id> <edge_type>2</edge_type> <source_obj>118</source_obj> <sink_obj>120</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_278"> <id>304</id> <edge_type>1</edge_type> <source_obj>150</source_obj> <sink_obj>121</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_279"> <id>305</id> <edge_type>2</edge_type> <source_obj>152</source_obj> <sink_obj>121</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_280"> <id>306</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>121</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_281"> <id>307</id> <edge_type>2</edge_type> <source_obj>118</source_obj> <sink_obj>121</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_282"> <id>308</id> <edge_type>1</edge_type> <source_obj>119</source_obj> <sink_obj>122</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_283"> <id>309</id> <edge_type>1</edge_type> <source_obj>210</source_obj> <sink_obj>122</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_284"> <id>310</id> <edge_type>1</edge_type> <source_obj>119</source_obj> <sink_obj>123</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_285"> <id>311</id> <edge_type>1</edge_type> <source_obj>213</source_obj> <sink_obj>123</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_286"> <id>312</id> <edge_type>1</edge_type> <source_obj>122</source_obj> <sink_obj>124</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_287"> <id>313</id> <edge_type>2</edge_type> <source_obj>152</source_obj> <sink_obj>124</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_288"> <id>314</id> <edge_type>2</edge_type> <source_obj>154</source_obj> <sink_obj>124</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_289"> <id>315</id> <edge_type>1</edge_type> <source_obj>120</source_obj> <sink_obj>126</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_290"> <id>316</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>126</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_291"> <id>317</id> <edge_type>1</edge_type> <source_obj>121</source_obj> <sink_obj>129</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_292"> <id>318</id> <edge_type>1</edge_type> <source_obj>173</source_obj> <sink_obj>129</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_293"> <id>319</id> <edge_type>1</edge_type> <source_obj>129</source_obj> <sink_obj>130</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_294"> <id>320</id> <edge_type>1</edge_type> <source_obj>167</source_obj> <sink_obj>130</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_295"> <id>321</id> <edge_type>1</edge_type> <source_obj>121</source_obj> <sink_obj>130</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_296"> <id>322</id> <edge_type>1</edge_type> <source_obj>129</source_obj> <sink_obj>131</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_297"> <id>323</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>131</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_298"> <id>324</id> <edge_type>1</edge_type> <source_obj>120</source_obj> <sink_obj>131</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_299"> <id>325</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>132</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_300"> <id>327</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>133</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_301"> <id>328</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>133</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_302"> <id>329</id> <edge_type>1</edge_type> <source_obj>133</source_obj> <sink_obj>134</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_303"> <id>330</id> <edge_type>1</edge_type> <source_obj>130</source_obj> <sink_obj>138</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_304"> <id>331</id> <edge_type>1</edge_type> <source_obj>138</source_obj> <sink_obj>139</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_305"> <id>332</id> <edge_type>1</edge_type> <source_obj>134</source_obj> <sink_obj>139</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_306"> <id>333</id> <edge_type>1</edge_type> <source_obj>139</source_obj> <sink_obj>140</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_307"> <id>334</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>141</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_308"> <id>335</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>141</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_309"> <id>336</id> <edge_type>1</edge_type> <source_obj>140</source_obj> <sink_obj>141</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_310"> <id>338</id> <edge_type>1</edge_type> <source_obj>130</source_obj> <sink_obj>142</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_311"> <id>339</id> <edge_type>1</edge_type> <source_obj>237</source_obj> <sink_obj>142</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_312"> <id>340</id> <edge_type>1</edge_type> <source_obj>142</source_obj> <sink_obj>143</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_313"> <id>341</id> <edge_type>1</edge_type> <source_obj>132</source_obj> <sink_obj>144</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_314"> <id>342</id> <edge_type>1</edge_type> <source_obj>143</source_obj> <sink_obj>144</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_315"> <id>343</id> <edge_type>1</edge_type> <source_obj>144</source_obj> <sink_obj>145</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_316"> <id>344</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>146</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_317"> <id>345</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>146</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_318"> <id>346</id> <edge_type>1</edge_type> <source_obj>145</source_obj> <sink_obj>146</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_319"> <id>347</id> <edge_type>1</edge_type> <source_obj>146</source_obj> <sink_obj>147</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_320"> <id>348</id> <edge_type>1</edge_type> <source_obj>147</source_obj> <sink_obj>148</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_321"> <id>349</id> <edge_type>1</edge_type> <source_obj>141</source_obj> <sink_obj>148</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_322"> <id>350</id> <edge_type>1</edge_type> <source_obj>130</source_obj> <sink_obj>150</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_323"> <id>351</id> <edge_type>1</edge_type> <source_obj>176</source_obj> <sink_obj>150</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_324"> <id>352</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>151</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_325"> <id>353</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>93</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_326"> <id>354</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>93</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_327"> <id>355</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>93</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_328"> <id>356</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>94</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_329"> <id>357</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="_330"> <id>358</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>95</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_331"> <id>359</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>89</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_332"> <id>360</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>89</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_333"> <id>361</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>89</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_334"> <id>362</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>90</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_335"> <id>363</id> <edge_type>1</edge_type> <source_obj>89</source_obj> <sink_obj>90</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_336"> <id>364</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>91</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_337"> <id>365</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_338"> <id>366</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_339"> <id>367</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>85</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_340"> <id>368</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>86</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_341"> <id>369</id> <edge_type>1</edge_type> <source_obj>85</source_obj> <sink_obj>86</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_342"> <id>370</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>87</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_343"> <id>371</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_344"> <id>372</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_345"> <id>373</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>81</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_346"> <id>374</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>82</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_347"> <id>375</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="_348"> <id>376</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>83</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_349"> <id>377</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_350"> <id>378</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_351"> <id>379</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>77</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_352"> <id>380</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_353"> <id>381</id> <edge_type>1</edge_type> <source_obj>77</source_obj> <sink_obj>78</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_354"> <id>382</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>79</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_355"> <id>383</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_356"> <id>384</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_357"> <id>385</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>73</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_358"> <id>386</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>74</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_359"> <id>387</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="_360"> <id>388</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>75</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_361"> <id>389</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_362"> <id>390</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_363"> <id>391</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>69</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_364"> <id>392</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>70</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_365"> <id>393</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>70</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_366"> <id>394</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>71</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_367"> <id>395</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>97</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_368"> <id>396</id> <edge_type>1</edge_type> <source_obj>244</source_obj> <sink_obj>97</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_369"> <id>397</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>97</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_370"> <id>398</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>98</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_371"> <id>399</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="_372"> <id>400</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>99</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_373"> <id>401</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_374"> <id>402</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_375"> <id>403</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_376"> <id>404</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_377"> <id>405</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_378"> <id>406</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_379"> <id>407</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_380"> <id>408</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>37</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_381"> <id>409</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_382"> <id>410</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_383"> <id>411</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_384"> <id>412</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_385"> <id>413</id> <edge_type>1</edge_type> <source_obj>14</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_386"> <id>414</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_387"> <id>415</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_388"> <id>416</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>114</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_389"> <id>484</id> <edge_type>2</edge_type> <source_obj>29</source_obj> <sink_obj>35</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_390"> <id>485</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>41</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_391"> <id>486</id> <edge_type>2</edge_type> <source_obj>35</source_obj> <sink_obj>39</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_392"> <id>487</id> <edge_type>2</edge_type> <source_obj>39</source_obj> <sink_obj>35</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_393"> <id>488</id> <edge_type>2</edge_type> <source_obj>41</source_obj> <sink_obj>48</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_394"> <id>489</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>106</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_395"> <id>490</id> <edge_type>2</edge_type> <source_obj>48</source_obj> <sink_obj>68</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_396"> <id>491</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>100</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_397"> <id>492</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>96</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_398"> <id>493</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>92</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_399"> <id>494</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>88</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_400"> <id>495</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>84</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_401"> <id>496</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>80</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_402"> <id>497</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>76</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_403"> <id>498</id> <edge_type>2</edge_type> <source_obj>68</source_obj> <sink_obj>72</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_404"> <id>499</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_405"> <id>500</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_406"> <id>501</id> <edge_type>2</edge_type> <source_obj>80</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_407"> <id>502</id> <edge_type>2</edge_type> <source_obj>84</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_408"> <id>503</id> <edge_type>2</edge_type> <source_obj>88</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_409"> <id>504</id> <edge_type>2</edge_type> <source_obj>92</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_410"> <id>505</id> <edge_type>2</edge_type> <source_obj>96</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_411"> <id>506</id> <edge_type>2</edge_type> <source_obj>100</source_obj> <sink_obj>104</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_412"> <id>507</id> <edge_type>2</edge_type> <source_obj>104</source_obj> <sink_obj>48</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_413"> <id>508</id> <edge_type>2</edge_type> <source_obj>106</source_obj> <sink_obj>112</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_414"> <id>509</id> <edge_type>2</edge_type> <source_obj>112</source_obj> <sink_obj>118</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_415"> <id>510</id> <edge_type>2</edge_type> <source_obj>112</source_obj> <sink_obj>116</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_416"> <id>511</id> <edge_type>2</edge_type> <source_obj>116</source_obj> <sink_obj>112</sink_obj> <is_back_edge>1</is_back_edge> </item> <item class_id_reference="20" object_id="_417"> <id>512</id> <edge_type>2</edge_type> <source_obj>118</source_obj> <sink_obj>125</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_418"> <id>513</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>154</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_419"> <id>514</id> <edge_type>2</edge_type> <source_obj>125</source_obj> <sink_obj>152</sink_obj> <is_back_edge>0</is_back_edge> </item> <item class_id_reference="20" object_id="_420"> <id>515</id> <edge_type>2</edge_type> <source_obj>152</source_obj> <sink_obj>125</sink_obj> <is_back_edge>1</is_back_edge> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>10</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_421"> <mId>1</mId> <mTag>dct_2d</mTag> <mType>0</mType> <sub_regions> <count>9</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> <item>9</item> <item>10</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>342</mMinLatency> <mMaxLatency>342</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_422"> <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>29</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="_423"> <mId>3</mId> <mTag>Row_DCT_Loop</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>35</item> <item>39</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>104</mMinLatency> <mMaxLatency>104</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_424"> <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>41</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="_425"> <mId>5</mId> <mTag>Xpose_Row_Outer_Loop_Xpose_Row_Inner_Loop</mTag> <mType>1</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>11</count> <item_version>0</item_version> <item>48</item> <item>68</item> <item>72</item> <item>76</item> <item>80</item> <item>84</item> <item>88</item> <item>92</item> <item>96</item> <item>100</item> <item>104</item> </basic_blocks> <mII>1</mII> <mDepth>2</mDepth> <mMinTripCount>64</mMinTripCount> <mMaxTripCount>64</mMaxTripCount> <mMinLatency>64</mMinLatency> <mMaxLatency>64</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_426"> <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>106</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="_427"> <mId>7</mId> <mTag>Col_DCT_Loop</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>112</item> <item>116</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>8</mMinTripCount> <mMaxTripCount>8</mMaxTripCount> <mMinLatency>104</mMinLatency> <mMaxLatency>104</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_428"> <mId>8</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>118</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="_429"> <mId>9</mId> <mTag>Xpose_Col_Outer_Loop_Xpose_Col_Inner_Loop</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>125</item> <item>152</item> </basic_blocks> <mII>1</mII> <mDepth>2</mDepth> <mMinTripCount>64</mMinTripCount> <mMaxTripCount>64</mMaxTripCount> <mMinLatency>64</mMinLatency> <mMaxLatency>64</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_430"> <mId>10</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>154</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>99</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>18</first> <second class_id="28" tracking_level="0" version="0"> <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>22</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>0</first> <second>0</second> </second> </item> <item> <first>25</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>26</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>38</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>3</first> <second>1</second> </second> </item> <item> <first>66</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>70</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>78</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>81</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>83</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>85</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>86</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>87</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>89</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>90</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>91</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>93</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>94</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>95</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>97</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>98</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>99</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>102</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>103</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>105</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>107</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>108</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>110</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>111</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>114</first> <second> <first>6</first> <second>1</second> </second> </item> <item> <first>115</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>117</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>119</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>120</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>121</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>122</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>123</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>124</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>126</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>129</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>130</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>131</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>132</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>133</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>134</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>138</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>139</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>140</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>141</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>142</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>143</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>144</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>145</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>146</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>147</first> <second> <first>8</first> <second>1</second> </second> </item> <item> <first>148</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>150</first> <second> <first>8</first> <second>0</second> </second> </item> <item> <first>151</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>153</first> <second> <first>10</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="29" tracking_level="0" version="0"> <count>22</count> <item_version>0</item_version> <item class_id="30" tracking_level="0" version="0"> <first>29</first> <second class_id="31" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>39</first> <second> <first>1</first> <second>2</second> </second> </item> <item> <first>41</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>48</first> <second> <first>2</first> <second>2</second> </second> </item> <item> <first>68</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>72</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>76</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>80</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>84</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>88</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>92</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>96</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>100</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>104</first> <second> <first>2</first> <second>3</second> </second> </item> <item> <first>106</first> <second> <first>3</first> <second>3</second> </second> </item> <item> <first>112</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>116</first> <second> <first>4</first> <second>5</second> </second> </item> <item> <first>118</first> <second> <first>4</first> <second>4</second> </second> </item> <item> <first>125</first> <second> <first>5</first> <second>5</second> </second> </item> <item> <first>152</first> <second> <first>5</first> <second>6</second> </second> </item> <item> <first>154</first> <second> <first>6</first> <second>6</second> </second> </item> </bblk_ent_exit> <regions class_id="32" tracking_level="0" version="0"> <count>2</count> <item_version>0</item_version> <item class_id="33" tracking_level="1" version="0" object_id="_431"> <region_name>Xpose_Row_Outer_Loop_Xpose_Row_Inner_Loop</region_name> <basic_blocks> <count>11</count> <item_version>0</item_version> <item>48</item> <item>68</item> <item>72</item> <item>76</item> <item>80</item> <item>84</item> <item>88</item> <item>92</item> <item>96</item> <item>100</item> <item>104</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> <item class_id_reference="33" object_id="_432"> <region_name>Xpose_Col_Outer_Loop_Xpose_Col_Inner_Loop</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>125</item> <item>152</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>
-- Spécification du module Piles. generic Capacite : Integer; -- Nombre maximal d'éléments qu'une pile peut contenir type T_Element is private; -- Type des éléments de la pile package Piles is type T_Pile is limited private; --! "très privé" en Algorithmique ! --! Sur un type privé, on a droit à l'affectation (:=) et l'égalité (=). --! On perd ces opérations avec un type "limited private" (très privé). -- Initilaiser une pile. La pile est vide. procedure Initialiser (Pile : out T_Pile) with Post => Est_Vide (Pile); -- Est-ce que la pile est vide ? function Est_Vide (Pile : in T_Pile) return Boolean; -- Est-ce que la pile est pleine ? function Est_Pleine (Pile : in T_Pile) return Boolean; -- L'élément en sommet de la pile. function Sommet (Pile : in T_Pile) return T_Element with Pre => not Est_Vide (Pile); -- Empiler l'élément en somment de la pile. procedure Empiler (Pile : in out T_Pile; Element : in T_Element) with Pre => not Est_Pleine (Pile), Post => Sommet (Pile) = Element; -- Supprimer l'élément en sommet de pile procedure Depiler (Pile : in out T_Pile) with Pre => not Est_Vide (Pile); -- Afficher les éléments de la pile generic with procedure Afficher_Element (Un_Element: in T_Element); procedure Afficher (Pile : in T_Pile); private type T_Tab_Elements is array (1..Capacite) of T_Element; type T_Pile is record Elements : T_Tab_Elements; -- les éléments de la pile Taille: Integer; -- Nombre d'éléments dans la pile end record; end Piles;
pragma Style_Checks (Off); -- This spec has been automatically generated from STM32G474xx.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.LPTIM is pragma Preelaborate; --------------- -- Registers -- --------------- -- Interrupt and Status Register type ISR_Register is record -- Read-only. Compare match CMPM : Boolean; -- Read-only. Autoreload match ARRM : Boolean; -- Read-only. External trigger edge event EXTTRIG : Boolean; -- Read-only. Compare register update OK CMPOK : Boolean; -- Read-only. Autoreload register update OK ARROK : Boolean; -- Read-only. Counter direction change down to up UP : Boolean; -- Read-only. Counter direction change up to down DOWN : Boolean; -- unspecified Reserved_7_31 : HAL.UInt25; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ISR_Register use record CMPM at 0 range 0 .. 0; ARRM at 0 range 1 .. 1; EXTTRIG at 0 range 2 .. 2; CMPOK at 0 range 3 .. 3; ARROK at 0 range 4 .. 4; UP at 0 range 5 .. 5; DOWN at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- Interrupt Clear Register type ICR_Register is record -- Write-only. compare match Clear Flag CMPMCF : Boolean := False; -- Write-only. Autoreload match Clear Flag ARRMCF : Boolean := False; -- Write-only. External trigger valid edge Clear Flag EXTTRIGCF : Boolean := False; -- Write-only. Compare register update OK Clear Flag CMPOKCF : Boolean := False; -- Write-only. Autoreload register update OK Clear Flag ARROKCF : Boolean := False; -- Write-only. Direction change to UP Clear Flag UPCF : Boolean := False; -- Write-only. Direction change to down Clear Flag DOWNCF : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ICR_Register use record CMPMCF at 0 range 0 .. 0; ARRMCF at 0 range 1 .. 1; EXTTRIGCF at 0 range 2 .. 2; CMPOKCF at 0 range 3 .. 3; ARROKCF at 0 range 4 .. 4; UPCF at 0 range 5 .. 5; DOWNCF at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; -- Interrupt Enable Register type IER_Register is record -- Compare match Interrupt Enable CMPMIE : Boolean := False; -- Autoreload match Interrupt Enable ARRMIE : Boolean := False; -- External trigger valid edge Interrupt Enable EXTTRIGIE : Boolean := False; -- Compare register update OK Interrupt Enable CMPOKIE : Boolean := False; -- Autoreload register update OK Interrupt Enable ARROKIE : Boolean := False; -- Direction change to UP Interrupt Enable UPIE : Boolean := False; -- Direction change to down Interrupt Enable DOWNIE : Boolean := False; -- unspecified Reserved_7_31 : HAL.UInt25 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for IER_Register use record CMPMIE at 0 range 0 .. 0; ARRMIE at 0 range 1 .. 1; EXTTRIGIE at 0 range 2 .. 2; CMPOKIE at 0 range 3 .. 3; ARROKIE at 0 range 4 .. 4; UPIE at 0 range 5 .. 5; DOWNIE at 0 range 6 .. 6; Reserved_7_31 at 0 range 7 .. 31; end record; subtype CFGR_CKPOL_Field is HAL.UInt2; subtype CFGR_CKFLT_Field is HAL.UInt2; subtype CFGR_TRGFLT_Field is HAL.UInt2; subtype CFGR_PRESC_Field is HAL.UInt3; subtype CFGR_TRIGSEL_0_Field is HAL.UInt3; subtype CFGR_TRIGEN_Field is HAL.UInt2; -- Configuration Register type CFGR_Register is record -- Clock selector CKSEL : Boolean := False; -- Clock Polarity CKPOL : CFGR_CKPOL_Field := 16#0#; -- Configurable digital filter for external clock CKFLT : CFGR_CKFLT_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- Configurable digital filter for trigger TRGFLT : CFGR_TRGFLT_Field := 16#0#; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Clock prescaler PRESC : CFGR_PRESC_Field := 16#0#; -- unspecified Reserved_12_12 : HAL.Bit := 16#0#; -- Trigger selector bits 0 to 2 TRIGSEL_0 : CFGR_TRIGSEL_0_Field := 16#0#; -- unspecified Reserved_16_16 : HAL.Bit := 16#0#; -- Trigger enable and polarity TRIGEN : CFGR_TRIGEN_Field := 16#0#; -- Timeout enable TIMOUT : Boolean := False; -- Waveform shape WAVE : Boolean := False; -- Waveform shape polarity WAVPOL : Boolean := False; -- Registers update mode PRELOAD : Boolean := False; -- counter mode enabled COUNTMODE : Boolean := False; -- Encoder mode enable ENC : Boolean := False; -- unspecified Reserved_25_28 : HAL.UInt4 := 16#0#; -- Trigger selector bit 3 TRIGSEL_1 : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CFGR_Register use record CKSEL at 0 range 0 .. 0; CKPOL at 0 range 1 .. 2; CKFLT at 0 range 3 .. 4; Reserved_5_5 at 0 range 5 .. 5; TRGFLT at 0 range 6 .. 7; Reserved_8_8 at 0 range 8 .. 8; PRESC at 0 range 9 .. 11; Reserved_12_12 at 0 range 12 .. 12; TRIGSEL_0 at 0 range 13 .. 15; Reserved_16_16 at 0 range 16 .. 16; TRIGEN at 0 range 17 .. 18; TIMOUT at 0 range 19 .. 19; WAVE at 0 range 20 .. 20; WAVPOL at 0 range 21 .. 21; PRELOAD at 0 range 22 .. 22; COUNTMODE at 0 range 23 .. 23; ENC at 0 range 24 .. 24; Reserved_25_28 at 0 range 25 .. 28; TRIGSEL_1 at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; -- Control Register type CR_Register is record -- LPTIM Enable ENABLE : Boolean := False; -- LPTIM start in single mode SNGSTRT : Boolean := False; -- Timer start in continuous mode CNTSTRT : Boolean := False; -- COUNTRST COUNTRST : Boolean := False; -- RSTARE RSTARE : Boolean := False; -- unspecified Reserved_5_31 : HAL.UInt27 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CR_Register use record ENABLE at 0 range 0 .. 0; SNGSTRT at 0 range 1 .. 1; CNTSTRT at 0 range 2 .. 2; COUNTRST at 0 range 3 .. 3; RSTARE at 0 range 4 .. 4; Reserved_5_31 at 0 range 5 .. 31; end record; subtype CMP_CMP_Field is HAL.UInt16; -- Compare Register type CMP_Register is record -- Compare value CMP : CMP_CMP_Field := 16#0#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CMP_Register use record CMP at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype ARR_ARR_Field is HAL.UInt16; -- Autoreload Register type ARR_Register is record -- Auto reload value ARR : ARR_ARR_Field := 16#1#; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for ARR_Register use record ARR at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype CNT_CNT_Field is HAL.UInt16; -- Counter Register type CNT_Register is record -- Read-only. Counter value CNT : CNT_CNT_Field; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for CNT_Register use record CNT at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype OR_IN1_1_Field is HAL.UInt2; subtype OR_IN2_1_Field is HAL.UInt2; -- option register type OR_Register is record -- IN1 bit 0 IN1_0 : Boolean := False; -- IN2 bit 0 IN2_0 : Boolean := False; -- IN1 bits 1 to 2 IN1_1 : OR_IN1_1_Field := 16#0#; -- IN2 bits 1 to 2 IN2_1 : OR_IN2_1_Field := 16#0#; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for OR_Register use record IN1_0 at 0 range 0 .. 0; IN2_0 at 0 range 1 .. 1; IN1_1 at 0 range 2 .. 3; IN2_1 at 0 range 4 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Low power timer type LPTIMER1_Peripheral is record -- Interrupt and Status Register ISR : aliased ISR_Register; -- Interrupt Clear Register ICR : aliased ICR_Register; -- Interrupt Enable Register IER : aliased IER_Register; -- Configuration Register CFGR : aliased CFGR_Register; -- Control Register CR : aliased CR_Register; -- Compare Register CMP : aliased CMP_Register; -- Autoreload Register ARR : aliased ARR_Register; -- Counter Register CNT : aliased CNT_Register; -- option register OR_k : aliased OR_Register; end record with Volatile; for LPTIMER1_Peripheral use record ISR at 16#0# range 0 .. 31; ICR at 16#4# range 0 .. 31; IER at 16#8# range 0 .. 31; CFGR at 16#C# range 0 .. 31; CR at 16#10# range 0 .. 31; CMP at 16#14# range 0 .. 31; ARR at 16#18# range 0 .. 31; CNT at 16#1C# range 0 .. 31; OR_k at 16#20# range 0 .. 31; end record; -- Low power timer LPTIMER1_Periph : aliased LPTIMER1_Peripheral with Import, Address => LPTIMER1_Base; end STM32_SVD.LPTIM;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (GNU-Linux/x86-64 Version) -- -- -- -- Copyright (C) 1992-2005, 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 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. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := Long_Long_Integer'First; Max_Int : constant := Long_Long_Integer'Last; Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; Max_Nonbinary_Modulus : constant := Integer'Last; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 0.000_001; -- Storage-related Declarations type Address is private; Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 64; Memory_Size : constant := 2 ** 64; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := Low_Order_First; -- Priority-related Declarations (RM D.1) Max_Priority : constant Positive := 30; Max_Interrupt_Priority : constant Positive := 31; subtype Any_Priority is Integer range 0 .. 31; subtype Priority is Any_Priority range 0 .. 30; subtype Interrupt_Priority is Any_Priority range 31 .. 31; Default_Priority : constant Priority := 15; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. AAMP : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := False; Command_Line_Args : constant Boolean := True; Compiler_System_Version : constant Boolean := False; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := True; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Functions_Return_By_DSP : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := False; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := False; Support_64_Bit_Divides : constant Boolean := True; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := False; ZCX_By_Default : constant Boolean := True; GCC_ZCX_Support : constant Boolean := True; Front_End_ZCX_Support : constant Boolean := False; -- Obsolete entries, to be removed eventually (bootstrap issues!) High_Integrity_Mode : constant Boolean := False; Long_Shifts_Inlined : constant Boolean := True; end System;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- ADA.NUMERICS.LONG_LONG_COMPLEX.ELEMENTARY_FUNCTIONS -- -- -- -- S p e c -- -- -- -- This specification is derived 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. -- -- -- ------------------------------------------------------------------------------ with Ada.Numerics.Long_Long_Complex_Types; with Ada.Numerics.Generic_Complex_Elementary_Functions; package Ada.Numerics.Long_Long_Complex_Elementary_Functions is new Ada.Numerics.Generic_Complex_Elementary_Functions (Ada.Numerics.Long_Long_Complex_Types);
pragma Ada_2005; pragma Style_Checks (Off); with Interfaces.C; use Interfaces.C; package rdseedintrin_h is -- Copyright (C) 2012-2017 Free Software Foundation, Inc. -- This file is part of GCC. -- GCC 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, or (at your option) -- any later version. -- GCC 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. -- 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/>. -- skipped func _rdseed16_step -- skipped func _rdseed32_step -- skipped func _rdseed64_step end rdseedintrin_h;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, 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. ------------------------------------------------------------------------------ -- A package merge defines how the contents of one package are extended by -- the contents of another package. ------------------------------------------------------------------------------ with AMF.CMOF.Directed_Relationships; limited with AMF.CMOF.Packages; package AMF.CMOF.Package_Merges is pragma Preelaborate; type CMOF_Package_Merge is limited interface and AMF.CMOF.Directed_Relationships.CMOF_Directed_Relationship; type CMOF_Package_Merge_Access is access all CMOF_Package_Merge'Class; for CMOF_Package_Merge_Access'Storage_Size use 0; not overriding function Get_Receiving_Package (Self : not null access constant CMOF_Package_Merge) return AMF.CMOF.Packages.CMOF_Package_Access is abstract; -- Getter of PackageMerge::receivingPackage. -- -- References the Package that is being extended with the contents of the -- merged package of the PackageMerge. not overriding procedure Set_Receiving_Package (Self : not null access CMOF_Package_Merge; To : AMF.CMOF.Packages.CMOF_Package_Access) is abstract; -- Setter of PackageMerge::receivingPackage. -- -- References the Package that is being extended with the contents of the -- merged package of the PackageMerge. not overriding function Get_Merged_Package (Self : not null access constant CMOF_Package_Merge) return AMF.CMOF.Packages.CMOF_Package_Access is abstract; -- Getter of PackageMerge::mergedPackage. -- -- References the Package that is to be merged with the receiving package -- of the PackageMerge. not overriding procedure Set_Merged_Package (Self : not null access CMOF_Package_Merge; To : AMF.CMOF.Packages.CMOF_Package_Access) is abstract; -- Setter of PackageMerge::mergedPackage. -- -- References the Package that is to be merged with the receiving package -- of the PackageMerge. end AMF.CMOF.Package_Merges;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, 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 STMicroelectronics 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 file is based on: -- -- @file stm32f746g_discovery_audio.h -- -- @author MCD Application Team -- ------------------------------------------------------------------------------ with HAL.Audio; use HAL.Audio; with HAL.I2C; use HAL.I2C; with Ravenscar_Time; private with WM8994; package Audio is type WM8994_Audio_Device (Port : not null Any_I2C_Port) is tagged limited private; procedure Initialize_Audio_Out (This : in out WM8994_Audio_Device; Volume : Audio_Volume; Frequency : Audio_Frequency); procedure Set_Volume (This : in out WM8994_Audio_Device; Volume : Audio_Volume); procedure Set_Frequency (This : in out WM8994_Audio_Device; Frequency : Audio_Frequency); procedure Play (This : in out WM8994_Audio_Device; Buffer : Audio_Buffer); procedure Pause (This : in out WM8994_Audio_Device); procedure Resume (This : in out WM8994_Audio_Device); procedure Stop (This : in out WM8994_Audio_Device); private Audio_I2C_Addr : constant I2C_Address := 16#34#; type WM8994_Audio_Device (Port : not null Any_I2C_Port) is tagged limited record Device : WM8994.WM8994_Device (Port, Audio_I2C_Addr, Ravenscar_Time.Delays); end record; end Audio;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- I N T E R F A C E S . C -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package body Interfaces.C is ----------------------- -- Is_Nul_Terminated -- ----------------------- -- Case of char_array function Is_Nul_Terminated (Item : char_array) return Boolean is begin for J in Item'Range loop if Item (J) = nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of wchar_array function Is_Nul_Terminated (Item : wchar_array) return Boolean is begin for J in Item'Range loop if Item (J) = wide_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of char16_array function Is_Nul_Terminated (Item : char16_array) return Boolean is begin for J in Item'Range loop if Item (J) = char16_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; -- Case of char32_array function Is_Nul_Terminated (Item : char32_array) return Boolean is begin for J in Item'Range loop if Item (J) = char32_nul then return True; end if; end loop; return False; end Is_Nul_Terminated; ------------ -- To_Ada -- ------------ -- Convert char to Character function To_Ada (Item : char) return Character is begin return Character'Val (char'Pos (Item)); end To_Ada; -- Convert char_array to String (function form) function To_Ada (Item : char_array; Trim_Nul : Boolean := True) return String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert char_array to String (procedure form) procedure To_Ada (Item : char_array; Target : out String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := Character (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; -- Convert wchar_t to Wide_Character function To_Ada (Item : wchar_t) return Wide_Character is begin return Wide_Character (Item); end To_Ada; -- Convert wchar_array to Wide_String (function form) function To_Ada (Item : wchar_array; Trim_Nul : Boolean := True) return Wide_String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = wide_nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : Wide_String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert wchar_array to Wide_String (procedure form) procedure To_Ada (Item : wchar_array; Target : out Wide_String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = wide_nul then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; -- Convert char16_t to Wide_Character function To_Ada (Item : char16_t) return Wide_Character is begin return Wide_Character'Val (char16_t'Pos (Item)); end To_Ada; -- Convert char16_array to Wide_String (function form) function To_Ada (Item : char16_array; Trim_Nul : Boolean := True) return Wide_String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = char16_t'Val (0) then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : Wide_String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert char16_array to Wide_String (procedure form) procedure To_Ada (Item : char16_array; Target : out Wide_String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = char16_t'Val (0) then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; -- Convert char32_t to Wide_Wide_Character function To_Ada (Item : char32_t) return Wide_Wide_Character is begin return Wide_Wide_Character'Val (char32_t'Pos (Item)); end To_Ada; -- Convert char32_array to Wide_Wide_String (function form) function To_Ada (Item : char32_array; Trim_Nul : Boolean := True) return Wide_Wide_String is Count : Natural; From : size_t; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = char32_t'Val (0) then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; declare R : Wide_Wide_String (1 .. Count); begin for J in R'Range loop R (J) := To_Ada (Item (size_t (J) + (Item'First - 1))); end loop; return R; end; end To_Ada; -- Convert char32_array to Wide_Wide_String (procedure form) procedure To_Ada (Item : char32_array; Target : out Wide_Wide_String; Count : out Natural; Trim_Nul : Boolean := True) is From : size_t; To : Positive; begin if Trim_Nul then From := Item'First; loop if From > Item'Last then -- raise Terminator_Error; raise Program_Error; elsif Item (From) = char32_t'Val (0) then exit; else From := From + 1; end if; end loop; Count := Natural (From - Item'First); else Count := Item'Length; end if; if Count > Target'Length then raise Constraint_Error; else From := Item'First; To := Target'First; for J in 1 .. Count loop Target (To) := To_Ada (Item (From)); From := From + 1; To := To + 1; end loop; end if; end To_Ada; ---------- -- To_C -- ---------- -- Convert Character to char function To_C (Item : Character) return char is begin return char'Val (Character'Pos (Item)); end To_C; -- Convert String to char_array (function form) function To_C (Item : String; Append_Nul : Boolean := True) return char_array is begin if Append_Nul then declare R : char_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := nul; return R; end; -- Append_Nul False else -- A nasty case, if the string is null, we must return a null -- char_array. The lower bound of this array is required to be zero -- (RM B.3(50)) but that is of course impossible given that size_t -- is unsigned. According to Ada 2005 AI-258, the result is to raise -- Constraint_Error. This is also the appropriate behavior in Ada 95, -- since nothing else makes sense. if Item'Length = 0 then raise Constraint_Error; -- Normal case else declare R : char_array (0 .. Item'Length - 1); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; return R; end; end if; end if; end To_C; -- Convert String to char_array (procedure form) procedure To_C (Item : String; Target : out char_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := char (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := nul; Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; -- Convert Wide_Character to wchar_t function To_C (Item : Wide_Character) return wchar_t is begin return wchar_t (Item); end To_C; -- Convert Wide_String to wchar_array (function form) function To_C (Item : Wide_String; Append_Nul : Boolean := True) return wchar_array is begin if Append_Nul then declare R : wchar_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := wide_nul; return R; end; else -- A nasty case, if the string is null, we must return a null -- wchar_array. The lower bound of this array is required to be zero -- (RM B.3(50)) but that is of course impossible given that size_t -- is unsigned. According to Ada 2005 AI-258, the result is to raise -- Constraint_Error. This is also the appropriate behavior in Ada 95, -- since nothing else makes sense. if Item'Length = 0 then raise Constraint_Error; else declare R : wchar_array (0 .. Item'Length - 1); begin for J in size_t range 0 .. Item'Length - 1 loop R (J) := To_C (Item (Integer (J) + Item'First)); end loop; return R; end; end if; end if; end To_C; -- Convert Wide_String to wchar_array (procedure form) procedure To_C (Item : Wide_String; Target : out wchar_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := wide_nul; Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; -- Convert Wide_Character to char16_t function To_C (Item : Wide_Character) return char16_t is begin return char16_t'Val (Wide_Character'Pos (Item)); end To_C; -- Convert Wide_String to char16_array (function form) function To_C (Item : Wide_String; Append_Nul : Boolean := True) return char16_array is begin if Append_Nul then declare R : char16_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := char16_t'Val (0); return R; end; else -- A nasty case, if the string is null, we must return a null -- char16_array. The lower bound of this array is required to be zero -- (RM B.3(50)) but that is of course impossible given that size_t -- is unsigned. According to Ada 2005 AI-258, the result is to raise -- Constraint_Error. This is also the appropriate behavior in Ada 95, -- since nothing else makes sense. if Item'Length = 0 then raise Constraint_Error; else declare R : char16_array (0 .. Item'Length - 1); begin for J in size_t range 0 .. Item'Length - 1 loop R (J) := To_C (Item (Integer (J) + Item'First)); end loop; return R; end; end if; end if; end To_C; -- Convert Wide_String to char16_array (procedure form) procedure To_C (Item : Wide_String; Target : out char16_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := char16_t'Val (0); Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; -- Convert Wide_Character to char32_t function To_C (Item : Wide_Wide_Character) return char32_t is begin return char32_t'Val (Wide_Wide_Character'Pos (Item)); end To_C; -- Convert Wide_Wide_String to char32_array (function form) function To_C (Item : Wide_Wide_String; Append_Nul : Boolean := True) return char32_array is begin if Append_Nul then declare R : char32_array (0 .. Item'Length); begin for J in Item'Range loop R (size_t (J - Item'First)) := To_C (Item (J)); end loop; R (R'Last) := char32_t'Val (0); return R; end; else -- A nasty case, if the string is null, we must return a null -- char32_array. The lower bound of this array is required to be zero -- (RM B.3(50)) but that is of course impossible given that size_t -- is unsigned. According to Ada 2005 AI-258, the result is to raise -- Constraint_Error. if Item'Length = 0 then raise Constraint_Error; else declare R : char32_array (0 .. Item'Length - 1); begin for J in size_t range 0 .. Item'Length - 1 loop R (J) := To_C (Item (Integer (J) + Item'First)); end loop; return R; end; end if; end if; end To_C; -- Convert Wide_Wide_String to char32_array (procedure form) procedure To_C (Item : Wide_Wide_String; Target : out char32_array; Count : out size_t; Append_Nul : Boolean := True) is To : size_t; begin if Target'Length < Item'Length then raise Constraint_Error; else To := Target'First; for From in Item'Range loop Target (To) := To_C (Item (From)); To := To + 1; end loop; if Append_Nul then if To > Target'Last then raise Constraint_Error; else Target (To) := char32_t'Val (0); Count := Item'Length + 1; end if; else Count := Item'Length; end if; end if; end To_C; end Interfaces.C;
------------------------------------------------------------------------------ -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ with File_IO; use File_IO; package body Command_Line.Filesystem.List_Directory is ------------- -- Execute -- ------------- overriding procedure Execute (This : in out Ls_Cmd; Args : in out Arguments'Class; Put : Put_Procedure; Put_Line : Put_Line_Procedure) is pragma Unreferenced (This); Recursive : Boolean := False; Show_All : Boolean := False; procedure List (Path : String); ---------- -- List -- ---------- procedure List (Path : String) is DD : Directory_Descriptor; Status : Status_Code; First : Boolean := True; begin Status := Open (DD, Path); if Status /= OK then Put ("Cannot open directory '" & Path & "': " & Status'Img); return; end if; if Recursive then Put_Line (Path & ":"); end if; loop declare Ent : constant Directory_Entry := Read (DD); begin exit when Ent = Invalid_Dir_Entry; if not Ent.Hidden or else Show_All then if First then Put (Ent.Name); First := False; else Put (" " & Ent.Name); end if; end if; end; end loop; Put_Line (""); if Recursive then Reset (DD); loop declare Ent : constant Directory_Entry := Read (DD); begin exit when Ent = Invalid_Dir_Entry; if Ent.Subdirectory then List (Path & "/" & Ent.Name); end if; end; end loop; end if; Close (DD); end List; begin loop declare Arg : constant String := Args.Next; begin if Arg'Length = 0 then return; elsif Arg = "-r" or else Arg = "-R" then Recursive := True; elsif Arg = "-a" then Show_All := True; else List (Arg); end if; end; end loop; end Execute; ---------- -- Help -- ---------- overriding procedure Help (This : in out Ls_Cmd; Put : Put_Procedure; Put_Line : Put_Line_Procedure) is pragma Unreferenced (Put, This); begin Put_Line ("Usage: ls [-a] [-r|-R] [FILE]..."); Put_Line ("List information about files and directories."); Put_Line (" -a : do not ignore hidden files or directories"); Put_Line (" -r, -R : list subdirectories recursively"); end Help; end Command_Line.Filesystem.List_Directory;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Localization, Internationalization, Globalization for Ada -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2015, 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$ ------------------------------------------------------------------------------ pragma Restrictions (No_Elaboration_Code); -- GNAT: enforce generation of preinitialized data section instead of -- generation of elaboration code. package Matreshka.Internals.Unicode.Ucd.Core_0031 is pragma Preelaborate; Group_0031 : aliased constant Core_Second_Stage := (16#00# .. 16#04# => -- 3100 .. 3104 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#05# .. 16#2D# => -- 3105 .. 312D (Other_Letter, Wide, Other, A_Letter, O_Letter, Ideographic, (Alphabetic | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start => True, others => False)), 16#2E# .. 16#30# => -- 312E .. 3130 (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#64# => -- 3164 (Other_Letter, Wide, Other, A_Letter, O_Letter, Ideographic, (Other_Default_Ignorable_Code_Point | Alphabetic | Default_Ignorable_Code_Point | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False)), 16#8F# => -- 318F (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#90# .. 16#91# => -- 3190 .. 3191 (Other_Symbol, Wide, Other, Other, Other, Ideographic, (Grapheme_Base => True, others => False)), 16#92# .. 16#95# => -- 3192 .. 3195 (Other_Number, Wide, Other, Other, Other, Ideographic, (Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#96# .. 16#9F# => -- 3196 .. 319F (Other_Symbol, Wide, Other, Other, Other, Ideographic, (Grapheme_Base | Changes_When_NFKC_Casefolded => True, others => False)), 16#A0# .. 16#BA# => -- 31A0 .. 31BA (Other_Letter, Wide, Other, A_Letter, O_Letter, Ideographic, (Alphabetic | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start => True, others => False)), 16#BB# .. 16#BF# => -- 31BB .. 31BF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#C0# .. 16#E3# => -- 31C0 .. 31E3 (Other_Symbol, Wide, Other, Other, Other, Ideographic, (Grapheme_Base => True, others => False)), 16#E4# .. 16#EF# => -- 31E4 .. 31EF (Unassigned, Neutral, Other, Other, Other, Unknown, (others => False)), 16#F0# .. 16#FF# => -- 31F0 .. 31FF (Other_Letter, Wide, Other, Katakana, O_Letter, Conditional_Japanese_Starter, (Alphabetic | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start => True, others => False)), others => (Other_Letter, Wide, Other, A_Letter, O_Letter, Ideographic, (Alphabetic | Grapheme_Base | ID_Continue | ID_Start | XID_Continue | XID_Start | Changes_When_NFKC_Casefolded => True, others => False))); end Matreshka.Internals.Unicode.Ucd.Core_0031;
with Ada.Containers.Formal_Hashed_Maps; with Ada.Containers.Functional_Maps; with Ada.Containers; use Ada.Containers; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Assignment_Tree_Branch_Bound_Communication; use Assignment_Tree_Branch_Bound_Communication; with Common; use Common; with LMCP_Messages; use LMCP_Messages; package Assignment_Tree_Branch_Bound with SPARK_Mode is type Cost_Function_Kind is (Minmax, Cumulative); package Int64_UAR_Maps is new Ada.Containers.Formal_Hashed_Maps (Key_Type => Int64, Element_Type => UniqueAutomationRequest, Hash => Int64_Hash); subtype Int64_UniqueAutomationRequest_Map is Int64_UAR_Maps.Map (10, Int64_UAR_Maps.Default_Modulus (10)); use Int64_UAR_Maps; package Int64_TaskPlanOptions_Maps is new Ada.Containers.Functional_Maps (Key_Type => Int64, Element_Type => TaskPlanOptions); type Int64_TPO_Map is new Int64_TaskPlanOptions_Maps.Map; package Int64_TPO_Map_Maps is new Ada.Containers.Formal_Hashed_Maps (Key_Type => Int64, Element_Type => Int64_TPO_Map, Hash => Int64_Hash); subtype Int64_TaskPlanOptions_Map_Map is Int64_TPO_Map_Maps.Map (10, Int64_TPO_Map_Maps.Default_Modulus (10)); use Int64_TPO_Map_Maps; use Int64_TPO_Map_Maps.Formal_Model; package Int64_TaskPlanOptions_Map_Maps_P renames Int64_TPO_Map_Maps.Formal_Model.P; package Int64_TaskPlanOptions_Map_Maps_K renames Int64_TPO_Map_Maps.Formal_Model.K; package Int64_ACM_Maps is new Ada.Containers.Formal_Hashed_Maps (Key_Type => Int64, Element_Type => AssignmentCostMatrix, Hash => Int64_Hash); subtype Int64_AssignmentCostMatrix_Map is Int64_ACM_Maps.Map (10, Int64_ACM_Maps.Default_Modulus (10)); use Int64_ACM_Maps; use Int64_ACM_Maps.Formal_Model; package Int64_AssignmentCostMatrix_Maps_P renames Int64_ACM_Maps.Formal_Model.P; package Int64_AssignmentCostMatrix_Maps_K renames Int64_ACM_Maps.Formal_Model.K; ---------------------------- -- Annotation subprograms -- ---------------------------- function Valid_TaskPlanOptions (TaskPlanOptions_Map : Int64_TPO_Map) return Boolean; function Valid_AssignmentCostMatrix (Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean; function Travel_In_CostMatrix (VehicleId : Int64; DestOption : TaskOption; Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean; function Travel_In_CostMatrix (VehicleId : Int64; InitOption, DestOption : TaskOption; Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean; function All_Travels_In_CostMatrix (Request : UniqueAutomationRequest; TaskPlanOptions_Map : Int64_TPO_Map; Matrix : AssignmentCostMatrix) return Boolean; function All_EligibleEntities_In_EntityList (Request : UniqueAutomationRequest; TaskPlanOptions_Map : Int64_TPO_Map) return Boolean; ---------------------------------------- -- Assignment Tree Branch Bound types -- ---------------------------------------- type Assignment_Tree_Branch_Bound_Configuration_Data is record Cost_Function : Cost_Function_Kind := Minmax; Number_Nodes_Maximum : Int64 := 0; end record with Predicate => Number_Nodes_Maximum >= 0; type Assignment_Tree_Branch_Bound_State is record m_uniqueAutomationRequests : Int64_UniqueAutomationRequest_Map; m_taskPlanOptions : Int64_TaskPlanOptions_Map_Map; m_assignmentCostMatrixes : Int64_AssignmentCostMatrix_Map; end record with Predicate => (for all ReqId of m_taskPlanOptions => (Valid_TaskPlanOptions (Element (m_taskPlanOptions, ReqId)) and then Contains (m_uniqueAutomationRequests, ReqId) and then All_EligibleEntities_In_EntityList (Element (m_uniqueAutomationRequests, ReqId), Element (m_taskPlanOptions, ReqId)))) and then (for all ReqId of m_assignmentCostMatrixes => Valid_AssignmentCostMatrix (Element (m_assignmentCostMatrixes, ReqId)) and then Contains (m_uniqueAutomationRequests, ReqId) and then Contains (m_taskPlanOptions, ReqId) and then All_Travels_In_CostMatrix (Element (m_uniqueAutomationRequests, ReqId), Element (m_taskPlanOptions, ReqId), Element (m_assignmentCostMatrixes, ReqId))); --------------------------- -- Service functionality -- --------------------------- procedure Handle_Unique_Automation_Request (Mailbox : in out Assignment_Tree_Branch_Bound_Mailbox; Data : Assignment_Tree_Branch_Bound_Configuration_Data; State : in out Assignment_Tree_Branch_Bound_State; Areq : UniqueAutomationRequest) with Pre => not Contains (State.m_uniqueAutomationRequests, Areq.RequestID) and then not Contains (State.m_assignmentCostMatrixes, Areq.RequestID); procedure Handle_Task_Plan_Options (Mailbox : in out Assignment_Tree_Branch_Bound_Mailbox; Data : Assignment_Tree_Branch_Bound_Configuration_Data; State : in out Assignment_Tree_Branch_Bound_State; Options : TaskPlanOptions) with Pre => (for all TaskOption of Options.Options => (TaskOption.Cost >= 0 and then Options.TaskID = TaskOption.TaskID)) and then not Contains (State.m_assignmentCostMatrixes, Options.CorrespondingAutomationRequestID) and then (not Contains (State.m_taskPlanOptions, Options.CorrespondingAutomationRequestID) or else not Has_Key (Element (State.m_taskPlanOptions, Options.CorrespondingAutomationRequestID), Options.TaskID)) and then Contains (State.m_uniqueAutomationRequests, Options.CorrespondingAutomationRequestID) and then (for all Option of Options.Options => (for all EntityId of Option.EligibleEntities => Contains (Element (State.m_uniqueAutomationRequests, Options.CorrespondingAutomationRequestID).EntityList, TO_Sequences.First, Last (Element (State.m_uniqueAutomationRequests, Options.CorrespondingAutomationRequestID).EntityList), EntityId))); procedure Handle_Assignment_Cost_Matrix (Mailbox : in out Assignment_Tree_Branch_Bound_Mailbox; Data : Assignment_Tree_Branch_Bound_Configuration_Data; State : in out Assignment_Tree_Branch_Bound_State; Matrix : AssignmentCostMatrix) with Pre => not Contains (State.m_assignmentCostMatrixes, Matrix.CorrespondingAutomationRequestID) and then Valid_AssignmentCostMatrix (Matrix) and then Contains (State.m_uniqueAutomationRequests, Matrix.CorrespondingAutomationRequestID) and then Contains (State.m_taskPlanOptions, Matrix.CorrespondingAutomationRequestID) and then All_Travels_In_CostMatrix (Element (State.m_uniqueAutomationRequests, Matrix.CorrespondingAutomationRequestID), Element (State.m_taskPlanOptions, Matrix.CorrespondingAutomationRequestID), Matrix); procedure Check_Assignment_Ready (Mailbox : in out Assignment_Tree_Branch_Bound_Mailbox; Data : Assignment_Tree_Branch_Bound_Configuration_Data; State : in out Assignment_Tree_Branch_Bound_State; ReqId : Int64); procedure Send_TaskAssignmentSummary (Mailbox : in out Assignment_Tree_Branch_Bound_Mailbox; Data : Assignment_Tree_Branch_Bound_Configuration_Data; State : in out Assignment_Tree_Branch_Bound_State; ReqId : Int64) with Pre => Contains (State.m_uniqueAutomationRequests, ReqId) and then Contains (State.m_assignmentCostMatrixes, ReqId) and then Contains (State.m_taskPlanOptions, ReqId) and then (for all TaskId of Element (State.m_uniqueAutomationRequests, ReqId).TaskList => Has_Key (Element (State.m_taskPlanOptions, ReqId), TaskId)) and then Valid_TaskPlanOptions (Element (State.m_taskPlanOptions, ReqId)); procedure Run_Calculate_Assignment (Data : Assignment_Tree_Branch_Bound_Configuration_Data; Automation_Request : UniqueAutomationRequest; Assignment_Cost_Matrix : AssignmentCostMatrix; TaskPlanOptions_Map : Int64_TPO_Map; Summary : out TaskAssignmentSummary; Error : out Boolean; Message : out Unbounded_String) with Pre => Valid_AssignmentCostMatrix (Assignment_Cost_Matrix) and then Valid_TaskPlanOptions (TaskPlanOptions_Map) and then (for all TaskId of Automation_Request.TaskList => Has_Key (TaskPlanOptions_Map, TaskId)) and then (for all Id of TaskPlanOptions_Map => (for all TaskOption of Get (TaskPlanOptions_Map, Id).Options => TaskOption.TaskID = Id)) and then All_Travels_In_CostMatrix (Automation_Request, TaskPlanOptions_Map, Assignment_Cost_Matrix) and then All_EligibleEntities_In_EntityList (Automation_Request, TaskPlanOptions_Map); -- Returns the assignment that minimizes the cost. private function Valid_TaskPlanOptions (TaskPlanOptions_Map : Int64_TPO_Map) return Boolean is (for all TaskId of TaskPlanOptions_Map => (TaskId in 0 .. 99_999 and then TaskId = Get (TaskPlanOptions_Map, TaskId).TaskID and then (for all TaskOption of Get (TaskPlanOptions_Map, TaskId).Options => (TaskId = TaskOption.TaskID and then TaskOption.OptionID in 0 .. 99_999 and then TaskOption.Cost >= 0)))); function Valid_AssignmentCostMatrix (Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean is (for all TOC of Assignment_Cost_Matrix.CostMatrix => TOC.TimeToGo >= 0); function Travel_In_CostMatrix (VehicleId : Int64; DestOption : TaskOption; Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean is (for some TOC of Assignment_Cost_Matrix.CostMatrix => (VehicleId = TOC.VehicleID and then 0 = TOC.InitialTaskID and then 0 = TOC.InitialTaskOption and then DestOption.TaskID = TOC.DestinationTaskID and then DestOption.OptionID = TOC.DestinationTaskOption)); function Travel_In_CostMatrix (VehicleId : Int64; InitOption, DestOption : TaskOption; Assignment_Cost_Matrix : AssignmentCostMatrix) return Boolean is (for some TOC of Assignment_Cost_Matrix.CostMatrix => (VehicleId = TOC.VehicleID and then InitOption.TaskID = TOC.InitialTaskID and then InitOption.OptionID = TOC.InitialTaskOption and then DestOption.TaskID = TOC.DestinationTaskID and then DestOption.OptionID = TOC.DestinationTaskOption)); function Is_Eligible (Request : UniqueAutomationRequest; Option : TaskOption; VehicleId : Int64) return Boolean is (Contains (Request.EntityList, TO_Sequences.First, Last (Request.EntityList), VehicleId) and then (if Length (Option.EligibleEntities) > 0 then Contains (Option.EligibleEntities, TO_Sequences.First, Last (Option.EligibleEntities), VehicleId))); function All_Travels_In_CostMatrix (Request : UniqueAutomationRequest; TaskPlanOptions_Map : Int64_TPO_Map; Matrix : AssignmentCostMatrix) return Boolean is (for all VehicleId of Request.EntityList => (for all TaskId_1 of TaskPlanOptions_Map => (for all Option_1 of Get (TaskPlanOptions_Map, TaskId_1).Options => (if Is_Eligible (Request, Option_1, VehicleId) then Travel_In_CostMatrix (VehicleId, Option_1, Matrix) and then (for all TaskId_2 of TaskPlanOptions_Map => (for all Option_2 of Get (TaskPlanOptions_Map, TaskId_2).Options => (if Option_1 /= Option_2 and then Is_Eligible (Request, Option_2, VehicleId) then Travel_In_CostMatrix (VehicleId, Option_1, Option_2, Matrix)))))))); function All_EligibleEntities_In_EntityList (Request : UniqueAutomationRequest; TaskPlanOptions_Map : Int64_TPO_Map) return Boolean is (for all TaskId of TaskPlanOptions_Map => (for all Option of Get (TaskPlanOptions_Map, TaskId).Options => (for all EntityId of Option.EligibleEntities => Contains (Request.EntityList, TO_Sequences.First, Last (Request.EntityList), EntityId)))); end Assignment_Tree_Branch_Bound;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- XML Processor -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2014, 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$ ------------------------------------------------------------------------------ package body XML.DOM.Elements is --------------------------- -- Set_Attribute_Node_NS -- --------------------------- procedure Set_Attribute_Node_NS (Self : not null access DOM_Element'Class; New_Attr : not null XML.DOM.Attributes.DOM_Attribute_Access) is Old_Attr : XML.DOM.Attributes.DOM_Attribute_Access; begin Old_Attr := Self.Set_Attribute_Node_NS (New_Attr); -- Free (Old_Attr); end Set_Attribute_Node_NS; end XML.DOM.Elements;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2019, Fabien Chouteau -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ -- This package implement the test signature output required for the RISC-V -- compliance testsuite. -- -- The test signature is dump of the RAM between the symbols begin_signature -- and end_signature into a file. with LibRISCV.Sim.Memory_Bus; package LibRISCV.Signature is procedure Set_Begin_Signature (Addr : Address); procedure Set_End_Signature (Addr : Address); procedure Signature_Filepath (Path : String); procedure Dump_Signature (Bus : in out Sim.Memory_Bus.Class); -- Procedure to call at the end of a test to dump the signature into the -- output file. end LibRISCV.Signature;
with Ada.Text_IO; use Ada.Text_IO; procedure Una_Tarea is task type A_Type; task type B_Type; A : A_Type; -- podemos declarar objetos de las tareas B : B_Type; task body A_Type is begin loop Put_Line("soy la tarea 1"); delay 3.0; end loop; end A_Type; task body B_Type is begin loop Put_Line(" la tarea 2"); delay 6.0; end loop; end B_Type; begin Put_Line("Soy el prog. prac1."); end Una_Tarea;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Panels.User_Data -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- 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 <Juergen.Pfeifer@T-Online.de> 1996 -- Version Control: -- $Revision: 1.7 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ with Interfaces.C; with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels; package body Terminal_Interface.Curses.Panels.User_Data is use type Interfaces.C.int; procedure Set_User_Data (Pan : in Panel; Data : in User_Access) is function Set_Panel_Userptr (Pan : Panel; Addr : User_Access) return C_Int; pragma Import (C, Set_Panel_Userptr, "set_panel_userptr"); begin if Set_Panel_Userptr (Pan, Data) = Curses_Err then raise Panel_Exception; end if; end Set_User_Data; function Get_User_Data (Pan : in Panel) return User_Access is function Panel_Userptr (Pan : Panel) return User_Access; pragma Import (C, Panel_Userptr, "panel_userptr"); begin return Panel_Userptr (Pan); end Get_User_Data; procedure Get_User_Data (Pan : in Panel; Data : out User_Access) is begin Data := Get_User_Data (Pan); end Get_User_Data; end Terminal_Interface.Curses.Panels.User_Data;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . P O W T E N _ L F L T -- -- -- -- S p e c -- -- -- -- Copyright (C) 2020-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. -- -- -- ------------------------------------------------------------------------------ -- This package provides a powers of ten table used for real conversions package System.Powten_LFlt is pragma Pure; Maxpow_Exact : constant := 22; -- Largest power of ten exactly representable with Long_Float. It is equal -- to floor (M * log 2 / log 5), when M is the size of the mantissa (53). Maxpow : constant := Maxpow_Exact * 2; -- Largest power of ten exactly representable with a double Long_Float Powten : constant array (0 .. Maxpow, 1 .. 2) of Long_Float := (00 => (1.0E+00, 0.0), 01 => (1.0E+01, 0.0), 02 => (1.0E+02, 0.0), 03 => (1.0E+03, 0.0), 04 => (1.0E+04, 0.0), 05 => (1.0E+05, 0.0), 06 => (1.0E+06, 0.0), 07 => (1.0E+07, 0.0), 08 => (1.0E+08, 0.0), 09 => (1.0E+09, 0.0), 10 => (1.0E+10, 0.0), 11 => (1.0E+11, 0.0), 12 => (1.0E+12, 0.0), 13 => (1.0E+13, 0.0), 14 => (1.0E+14, 0.0), 15 => (1.0E+15, 0.0), 16 => (1.0E+16, 0.0), 17 => (1.0E+17, 0.0), 18 => (1.0E+18, 0.0), 19 => (1.0E+19, 0.0), 20 => (1.0E+20, 0.0), 21 => (1.0E+21, 0.0), 22 => (1.0E+22, 0.0), 23 => (1.0E+23, 1.0E+23 - Long_Float'Machine (1.0E+23)), 24 => (1.0E+24, 1.0E+24 - Long_Float'Machine (1.0E+24)), 25 => (1.0E+25, 1.0E+25 - Long_Float'Machine (1.0E+25)), 26 => (1.0E+26, 1.0E+26 - Long_Float'Machine (1.0E+26)), 27 => (1.0E+27, 1.0E+27 - Long_Float'Machine (1.0E+27)), 28 => (1.0E+28, 1.0E+28 - Long_Float'Machine (1.0E+28)), 29 => (1.0E+29, 1.0E+29 - Long_Float'Machine (1.0E+29)), 30 => (1.0E+30, 1.0E+30 - Long_Float'Machine (1.0E+30)), 31 => (1.0E+31, 1.0E+31 - Long_Float'Machine (1.0E+31)), 32 => (1.0E+32, 1.0E+32 - Long_Float'Machine (1.0E+32)), 33 => (1.0E+33, 1.0E+33 - Long_Float'Machine (1.0E+33)), 34 => (1.0E+34, 1.0E+34 - Long_Float'Machine (1.0E+34)), 35 => (1.0E+35, 1.0E+35 - Long_Float'Machine (1.0E+35)), 36 => (1.0E+36, 1.0E+36 - Long_Float'Machine (1.0E+36)), 37 => (1.0E+37, 1.0E+37 - Long_Float'Machine (1.0E+37)), 38 => (1.0E+38, 1.0E+38 - Long_Float'Machine (1.0E+38)), 39 => (1.0E+39, 1.0E+39 - Long_Float'Machine (1.0E+39)), 40 => (1.0E+40, 1.0E+40 - Long_Float'Machine (1.0E+40)), 41 => (1.0E+41, 1.0E+41 - Long_Float'Machine (1.0E+41)), 42 => (1.0E+42, 1.0E+42 - Long_Float'Machine (1.0E+42)), 43 => (1.0E+43, 1.0E+43 - Long_Float'Machine (1.0E+43)), 44 => (1.0E+44, 1.0E+44 - Long_Float'Machine (1.0E+44))); end System.Powten_LFlt;
-- CA1108B.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 IF WITH_CLAUSES ARE GIVEN FOR BOTH A SPEC AND A BODY, AND -- THE CLAUSES NAME DIFFERENT LIBRARY UNITS, THE UNITS NAMED IN ALL THE -- CLAUSES ARE VISIBLE IN THE BODY AND IN SUBUNITS OF THE BODY. -- BHS 7/31/84 -- JBG 5/1/85 PACKAGE FIRST_PKG IS FUNCTION F (X : INTEGER := 1) RETURN INTEGER; END FIRST_PKG; PACKAGE BODY FIRST_PKG IS FUNCTION F (X : INTEGER := 1) RETURN INTEGER IS BEGIN RETURN X; END F; END FIRST_PKG; PACKAGE LATER_PKG IS FUNCTION F (Y : INTEGER := 2) RETURN INTEGER; END LATER_PKG; PACKAGE BODY LATER_PKG IS FUNCTION F (Y : INTEGER := 2) RETURN INTEGER IS BEGIN RETURN Y + 1; END F; END LATER_PKG; WITH REPORT, FIRST_PKG; USE REPORT; PRAGMA ELABORATE (FIRST_PKG); PACKAGE CA1108B_PKG IS I, J : INTEGER; PROCEDURE PROC; PROCEDURE CALL_SUBS (X, Y : IN OUT INTEGER); END CA1108B_PKG; WITH LATER_PKG; PRAGMA ELABORATE (LATER_PKG); PACKAGE BODY CA1108B_PKG IS PROCEDURE SUB (X, Y : IN OUT INTEGER) IS SEPARATE; PROCEDURE PROC IS I, J : INTEGER; BEGIN I := FIRST_PKG.F; IF I /= 1 THEN FAILED ("FIRST_PKG FUNCTION NOT VISIBLE IN " & "PACKAGE BODY PROCEDURE"); END IF; J := LATER_PKG.F; IF J /= 3 THEN FAILED ("LATER_PKG FUNCITON NOT VISIBLE IN " & "PACKAGE BODY PROCEDURE"); END IF; END PROC; PROCEDURE CALL_SUBS (X, Y : IN OUT INTEGER) IS BEGIN SUB (X, Y); END CALL_SUBS; BEGIN I := FIRST_PKG.F; IF I /= 1 THEN FAILED ("FIRST_PKG FUNCTION NOT VISIBLE IN PACKAGE BODY"); END IF; J := LATER_PKG.F; IF J /= 3 THEN FAILED ("LATER_PKG FUNCTION NOT VISIBLE IN PACKAGE BODY"); END IF; END CA1108B_PKG; WITH REPORT, CA1108B_PKG; USE REPORT, CA1108B_PKG; PROCEDURE CA1108B IS VAR1, VAR2 : INTEGER; BEGIN TEST ("CA1108B", "IF DIFFERENT WITH_CLAUSES GIVEN FOR PACKAGE " & "SPEC AND BODY, ALL NAMED UNITS ARE VISIBLE " & "IN THE BODY AND ITS SUBUNITS"); PROC; VAR1 := 0; VAR2 := 1; CALL_SUBS (VAR1, VAR2); IF VAR1 /= 1 THEN FAILED ("FIRST_PKG FUNCTION NOT VISIBLE IN SUBUNIT"); END IF; IF VAR2 /= 3 THEN FAILED ("LATER_PKG FUNCTION NOT VISIBLE IN SUBUNIT"); END IF; RESULT; END CA1108B; SEPARATE (CA1108B_PKG) PROCEDURE SUB (X, Y : IN OUT INTEGER) IS PROCEDURE SUB2 (A, B : IN OUT INTEGER) IS SEPARATE; BEGIN SUB2 (Y, X); IF Y /= 1 THEN FAILED ("FIRST_PKG FUNCTION NOT VISIBLE IN SUBUNIT " & "OF SUBUNIT"); END IF; IF X /= 3 THEN FAILED ("LATER_PKG FUNCTION NOT VISIBLE IN SUBUNIT " & "OF SUBUNIT"); END IF; X := FIRST_PKG.F; Y := LATER_PKG.F; END SUB; SEPARATE (CA1108B_PKG.SUB) PROCEDURE SUB2 (A, B : IN OUT INTEGER) IS BEGIN A := FIRST_PKG.F; B := LATER_PKG.F; END SUB2;
package physics.remote.Model -- -- A model describing physical properties, usable with DSA. -- is pragma remote_Types; type Item is abstract tagged record Id : model_Id := null_model_Id; Scale : Vector_3 := (1.0, 1.0, 1.0); end record; end physics.remote.Model;
generic Max_MyString_Length : Positive; package MyString with SPARK_Mode is type MyString is private; function To_String(M : MyString) return String with Post => To_String'Result'Length = Length(M) and To_String'Result'First = 1 and To_String'Result'Last = Length(M); function From_String(S : String) return MyString with Pre => (S'Length <= Max_MyString_Length), Post => (Length(From_String'Result) = S'Length); function Less(M1 : MyString; M2 : MyString) return Boolean; function Equal(M1 : MyString; M2 : MyString) return Boolean with Post => (if Equal'Result then Length(M1) = Length(M2) and (for all I in 1..Length(M1) => Get(M1,I) = Get(M2,I))); function Length(M : MyString) return Natural with Post => Length'Result <= Max_MyString_Length; function Substring(M : MyString; From : Positive; To : Positive) return MyString with Pre => From <= To and To <= Length(M), Post => Length(Substring'Result) = To - From + 1; function Get(M : MyString; Index : Positive) return Character with Pre => Index <= Length(M); procedure Get_Line(M : out MyString); private type MyStringStr is array(Positive range 1..Max_MyString_Length) of Character; type MyString is record Length : Natural range 0..Max_MyString_Length; Str : MyStringStr; end record; function Length(M : MyString) return Natural is (M.Length); function Get(M : MyString; Index : Positive) return Character is (M.Str(Index)); end MyString;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2016, 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 HAL.GPIO; package nRF51.GPIO is subtype GPIO_Pin_Index is Natural range 0 .. 31; type Pin_IO_Modes is (Mode_In, Mode_Out); type Pin_Resistors is (Pull_Up, Pull_Down, No_Pull); type Pin_Drive is (Drive_S0S1, Drive_H0S1, Drive_S0H1, Drive_H0H1, Drive_D0S1, Drive_D0H1, Drive_S0D1, Drive_H0D1); type Pin_Sense_Mode is (Sense_Disabled, Sense_For_High_Level, Sense_For_Low_Level); type Pin_Input_Buffer_Mode is (Input_Buffer_Connect, Input_Buffer_Disconnect); type GPIO_Configuration is record Mode : Pin_IO_Modes; Resistors : Pin_Resistors; Input_Buffer : Pin_Input_Buffer_Mode := Input_Buffer_Disconnect; Drive : Pin_Drive := Drive_S0S1; Sense : Pin_Sense_Mode := Sense_Disabled; end record; type GPIO_Point is new HAL.GPIO.GPIO_Point with record Pin : GPIO_Pin_Index; end record; overriding function Mode (This : GPIO_Point) return HAL.GPIO.GPIO_Mode; overriding function Set_Mode (This : in out GPIO_Point; Mode : HAL.GPIO.GPIO_Config_Mode) return Boolean; overriding function Pull_Resistor (This : GPIO_Point) return HAL.GPIO.GPIO_Pull_Resistor; overriding function Set_Pull_Resistor (This : in out GPIO_Point; Pull : HAL.GPIO.GPIO_Pull_Resistor) return Boolean; overriding function Set (This : GPIO_Point) return Boolean with Inline; -- Returns True if the bit specified by This.Pin is set (not zero) in the -- input data register of This.Port.all; returns False otherwise. overriding procedure Set (This : in out GPIO_Point) with Inline; -- For This.Port.all, sets the output data register bit specified by -- This.Pin to one. Other pins are unaffected. overriding procedure Clear (This : in out GPIO_Point) with Inline; -- For This.Port.all, sets the output data register bit specified by -- This.Pin to zero. Other pins are unaffected. overriding procedure Toggle (This : in out GPIO_Point) with Inline; -- For This.Port.all, negates the output data register bit specified by -- This.Pin (one becomes zero and vice versa). Other pins are unaffected. procedure Configure_IO (This : GPIO_Point; Config : GPIO_Configuration); -- Configures the characteristics specified by Config end nRF51.GPIO;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- A U N I T . A S S E R T I O N S -- -- -- -- B o d y -- -- -- -- -- -- Copyright (C) 2000-2011, 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 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 is maintained by AdaCore (http://www.adacore.com) -- -- -- ------------------------------------------------------------------------------ package body AUnit.Assertions is Failures : Failure_Lists.List; -- ??? Calls to Failures should be protected, so that we can use -- multitasking Current_Id : Test_Id := 1; procedure Init_Test (T : in out Test) is begin if T.Id = Null_Id then T.Id := Current_Id; Current_Id := Current_Id + 1; end if; end Init_Test; The_Current_Test : Test_Access := null; ------------ -- Assert -- ------------ procedure Assert (Condition : Boolean; Message : String; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line) is begin if not Assert (Condition, Message, Source, Line) then raise Assertion_Error; end if; end Assert; ------------ -- Assert -- ------------ function Assert (Condition : Boolean; Message : String; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line) return Boolean is begin if not Condition then Failure_Lists.Append (Failures, (Failure => (Format (Message), Format (Source), Line), Id => The_Current_Test.Id)); end if; return Condition; end Assert; ---------------------- -- Assert_Exception -- ---------------------- procedure Assert_Exception (Proc : Throwing_Exception_Proc; Message : String; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line) is separate; ------------ -- Assert -- ------------ procedure Assert (Actual : String; Expected : String; Message : String; Source : String := GNAT.Source_Info.File; Line : Natural := GNAT.Source_Info.Line) is begin if Actual /= Expected then Assert (False, Message & " - got '" & Actual & "', expecting '" & Expected & "'", Source, Line); end if; end Assert; -------------------- -- Clear_Failures -- -------------------- procedure Clear_Failures (T : Test) is C, N : Failure_Lists.Cursor; begin C := Failure_Lists.First (Failures); while Failure_Lists.Has_Element (C) loop N := Failure_Lists.Next (C); if Failure_Lists.Element (C).Id = T.Id then Failure_Lists.Delete (Failures, C); end if; C := N; end loop; end Clear_Failures; ------------------ -- Has_Failures -- ------------------ function Has_Failures (T : Test) return Boolean is begin return Has_Failure (First_Failure (T)); end Has_Failures; ------------------- -- First_Failure -- ------------------- function First_Failure (T : Test) return Failure_Iter is C : Failure_Lists.Cursor; begin C := Failure_Lists.First (Failures); while Failure_Lists.Has_Element (C) loop if Failure_Lists.Element (C).Id = T.Id then return Failure_Iter (C); end if; Failure_Lists.Next (C); end loop; return Failure_Iter (Failure_Lists.No_Element); end First_Failure; ----------------- -- Has_Failure -- ----------------- function Has_Failure (I : Failure_Iter) return Boolean is begin return Failure_Lists.Has_Element (Failure_Lists.Cursor (I)); end Has_Failure; function Get_Failure (I : Failure_Iter) return AUnit.Test_Results.Test_Failure is begin return Failure_Lists.Element (Failure_Lists.Cursor (I)).Failure; end Get_Failure; ---------- -- Next -- ---------- procedure Next (I : in out Failure_Iter) is Id : Test_Id; begin if not Has_Failure (I) then return; end if; Id := Failure_Lists.Element (Failure_Lists.Cursor (I)).Id; Failure_Lists.Next (Failure_Lists.Cursor (I)); while Failure_Lists.Has_Element (Failure_Lists.Cursor (I)) loop exit when Failure_Lists.Element (Failure_Lists.Cursor (I)).Id = Id; Failure_Lists.Next (Failure_Lists.Cursor (I)); end loop; end Next; ------------------ -- Current_Test -- ------------------ function Current_Test return Test_Access is begin return The_Current_Test; end Current_Test; ---------------------- -- Set_Current_Test -- ---------------------- procedure Set_Current_Test (T : Test_Access) is begin The_Current_Test := T; end Set_Current_Test; ------------- -- Copy_Id -- ------------- procedure Copy_Id (From : Test'Class; To : in out Test'Class) is begin To.Id := From.Id; end Copy_Id; end AUnit.Assertions;
package STM32GD.Drivers is pragma Pure; end STM32GD.Drivers;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- -- -- -- A D A . R E A L _ T I M E -- -- -- -- B o d y -- -- -- -- Copyright (C) 1991-2017, Florida State University -- -- Copyright (C) 1995-2020, 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 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. -- -- -- ------------------------------------------------------------------------------ with System.Tasking; with Unchecked_Conversion; package body Ada.Real_Time with SPARK_Mode => Off is --------- -- "*" -- --------- -- Note that Constraint_Error may be propagated function "*" (Left : Time_Span; Right : Integer) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span (Duration (Left) * Right); end "*"; function "*" (Left : Integer; Right : Time_Span) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span (Left * Duration (Right)); end "*"; --------- -- "+" -- --------- -- Note that Constraint_Error may be propagated function "+" (Left : Time; Right : Time_Span) return Time is pragma Unsuppress (Overflow_Check); begin return Time (Duration (Left) + Duration (Right)); end "+"; function "+" (Left : Time_Span; Right : Time) return Time is pragma Unsuppress (Overflow_Check); begin return Time (Duration (Left) + Duration (Right)); end "+"; function "+" (Left, Right : Time_Span) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span (Duration (Left) + Duration (Right)); end "+"; --------- -- "-" -- --------- -- Note that Constraint_Error may be propagated function "-" (Left : Time; Right : Time_Span) return Time is pragma Unsuppress (Overflow_Check); begin return Time (Duration (Left) - Duration (Right)); end "-"; function "-" (Left, Right : Time) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span (Duration (Left) - Duration (Right)); end "-"; function "-" (Left, Right : Time_Span) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span (Duration (Left) - Duration (Right)); end "-"; function "-" (Right : Time_Span) return Time_Span is pragma Unsuppress (Overflow_Check); begin return Time_Span_Zero - Right; end "-"; --------- -- "/" -- --------- -- Note that Constraint_Error may be propagated function "/" (Left, Right : Time_Span) return Integer is pragma Unsuppress (Overflow_Check); pragma Unsuppress (Division_Check); -- RM D.8 (27) specifies the effects of operators on Time_Span, and -- rounding of the division operator in particular, to be the same as -- effects on integer types. To get the correct rounding we first -- convert Time_Span to its root type Duration, which is represented as -- a 64-bit signed integer, and then use integer division. type Duration_Rep is range -(2 ** 63) .. +((2 ** 63 - 1)); function To_Integer is new Unchecked_Conversion (Duration, Duration_Rep); begin return Integer (To_Integer (Duration (Left)) / To_Integer (Duration (Right))); end "/"; function "/" (Left : Time_Span; Right : Integer) return Time_Span is pragma Unsuppress (Overflow_Check); pragma Unsuppress (Division_Check); begin -- Even though checks are unsuppressed, we need an explicit check for -- the case of largest negative integer divided by minus one, since -- some library routines we use fail to catch this case. This will be -- fixed at the compiler level in the future, at which point this test -- can be removed. if Left = Time_Span_First and then Right = -1 then raise Constraint_Error with "overflow"; end if; return Time_Span (Duration (Left) / Right); end "/"; ----------- -- Clock -- ----------- function Clock return Time is begin return Time (System.Task_Primitives.Operations.Monotonic_Clock); end Clock; ------------------ -- Microseconds -- ------------------ function Microseconds (US : Integer) return Time_Span is begin return Time_Span_Unit * US * 1_000; end Microseconds; ------------------ -- Milliseconds -- ------------------ function Milliseconds (MS : Integer) return Time_Span is begin return Time_Span_Unit * MS * 1_000_000; end Milliseconds; ------------- -- Minutes -- ------------- function Minutes (M : Integer) return Time_Span is begin return Milliseconds (M) * Integer'(60_000); end Minutes; ----------------- -- Nanoseconds -- ----------------- function Nanoseconds (NS : Integer) return Time_Span is begin return Time_Span_Unit * NS; end Nanoseconds; ------------- -- Seconds -- ------------- function Seconds (S : Integer) return Time_Span is begin return Milliseconds (S) * Integer'(1000); end Seconds; ----------- -- Split -- ----------- procedure Split (T : Time; SC : out Seconds_Count; TS : out Time_Span) is T_Val : Time; begin -- Special-case for Time_First, whose absolute value is anomalous, -- courtesy of two's complement. T_Val := (if T = Time_First then abs (Time_Last) else abs (T)); -- Extract the integer part of T, truncating towards zero SC := (if T_Val < 0.5 then 0 else Seconds_Count (Time_Span'(T_Val - 0.5))); if T < 0.0 then SC := -SC; end if; -- If original time is negative, need to truncate towards negative -- infinity, to make TS non-negative, as per ARM. if Time (SC) > T then SC := SC - 1; end if; TS := Time_Span (Duration (T) - Duration (SC)); end Split; ------------- -- Time_Of -- ------------- function Time_Of (SC : Seconds_Count; TS : Time_Span) return Time is pragma Suppress (Overflow_Check); pragma Suppress (Range_Check); -- We do all our own checks for this function -- This is not such a simple case, since TS is already 64 bits, and -- so we can't just promote everything to a wider type to ensure proper -- testing for overflow. The situation is that Seconds_Count is a MUCH -- wider type than Time_Span and Time (both of which have the underlying -- type Duration). -- <------------------- Seconds_Count --------------------> -- <-- Duration --> -- Now it is possible for an SC value outside the Duration range to -- be "brought back into range" by an appropriate TS value, but there -- are also clearly SC values that are completely out of range. Note -- that the above diagram is wildly out of scale, the difference in -- ranges is much greater than shown. -- We can't just go generating out of range Duration values to test for -- overflow, since Duration is a full range type, so we follow the steps -- shown below. SC_Lo : constant Seconds_Count := Seconds_Count (Duration (Time_Span_First) + Duration'(0.5)); SC_Hi : constant Seconds_Count := Seconds_Count (Duration (Time_Span_Last) - Duration'(0.5)); -- These are the maximum values of the seconds (integer) part of the -- Duration range. Used to compute and check the seconds in the result. TS_SC : Seconds_Count; -- Seconds part of input value TS_Fraction : Duration; -- Fractional part of input value, may be negative Result_SC : Seconds_Count; -- Seconds value for result Fudge : constant Seconds_Count := 10; -- Fudge value used to do end point checks far from end point FudgeD : constant Duration := Duration (Fudge); -- Fudge value as Duration Fudged_Result : Duration; -- Result fudged up or down by FudgeD procedure Out_Of_Range; pragma No_Return (Out_Of_Range); -- Raise exception for result out of range ------------------ -- Out_Of_Range -- ------------------ procedure Out_Of_Range is begin raise Constraint_Error with "result for Ada.Real_Time.Time_Of is out of range"; end Out_Of_Range; -- Start of processing for Time_Of begin -- If SC is so far out of range that there is no possibility of the -- addition of TS getting it back in range, raise an exception right -- away. That way we don't have to worry about SC values overflowing. if SC < 3 * SC_Lo or else SC > 3 * SC_Hi then Out_Of_Range; end if; -- Decompose input TS value TS_SC := Seconds_Count (Duration (TS)); TS_Fraction := Duration (TS) - Duration (TS_SC); -- Compute result seconds. If clearly out of range, raise error now Result_SC := SC + TS_SC; if Result_SC < (SC_Lo - 1) or else Result_SC > (SC_Hi + 1) then Out_Of_Range; end if; -- Now the result is simply Result_SC + TS_Fraction, but we can't just -- go computing that since it might be out of range. So what we do is -- to compute a value fudged down or up by 10.0 (arbitrary value, but -- that will do fine), and check that fudged value, and if in range -- unfudge it and return the result. -- Fudge positive result down, and check high bound if Result_SC > 0 then Fudged_Result := Duration (Result_SC - Fudge) + TS_Fraction; if Fudged_Result <= Duration'Last - FudgeD then return Time (Fudged_Result + FudgeD); else Out_Of_Range; end if; -- Same for negative values of seconds, fudge up and check low bound else Fudged_Result := Duration (Result_SC + Fudge) + TS_Fraction; if Fudged_Result >= Duration'First + FudgeD then return Time (Fudged_Result - FudgeD); else Out_Of_Range; end if; end if; end Time_Of; ----------------- -- To_Duration -- ----------------- function To_Duration (TS : Time_Span) return Duration is begin return Duration (TS); end To_Duration; ------------------ -- To_Time_Span -- ------------------ function To_Time_Span (D : Duration) return Time_Span is begin -- Note regarding AI-00432 requiring range checking on this conversion. -- In almost all versions of GNAT (and all to which this version of the -- Ada.Real_Time package apply), the range of Time_Span and Duration are -- the same, so there is no issue of overflow. return Time_Span (D); end To_Time_Span; begin -- Ensure that the tasking run time is initialized when using clock and/or -- delay operations. The initialization routine has the required machinery -- to prevent multiple calls to Initialize. System.Tasking.Initialize; end Ada.Real_Time;
------------------------------------------------------------------------------ -- Copyright (c) 2014, Natacha Porté -- -- -- -- Permission to use, copy, modify, and 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. -- ------------------------------------------------------------------------------ with GNAT.SHA1; with Natools.HMAC; package Natools.GNAT_HMAC.SHA1 is new Natools.HMAC (Hash_Context => GNAT.SHA1.Context, Initial_Context => GNAT.SHA1.Initial_Context, Update => GNAT.SHA1.Update, Digest => Natools.GNAT_HMAC.Digest, Block_Size_In_SE => 64);
----------------------------------------------------------------------- -- auth_cb -- Authentication callback examples -- Copyright (C) 2013, 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.Properties; with Util.Log.Loggers; with Util.Http.Clients.AWS; with AWS.Config; with AWS.Config.Set; with AWS.Server; with AWS.Services.Dispatchers.URI; with AWS.Services.Page_Server; with AWS.Services.Web_Block.Registry; with AWS.Net.SSL; with Auth_CB; procedure Auth_Demo is Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Auth_Demo"); Dispatcher : AWS.Services.Dispatchers.URI.Handler; WS : AWS.Server.HTTP; Config : AWS.Config.Object; begin if not AWS.Net.SSL.Is_Supported then Log.Error ("SSL is not supported by AWS."); Log.Error ("SSL is required for the OpenID connector to connect to OpenID providers."); Log.Error ("Please, rebuild AWS with SSL support."); return; end if; -- Get the authentication provider configuration. We use the Util.Properties and some -- java like property file. Other configuration implementation are possible. Auth_CB.Config.Load_Properties ("samples.properties"); Util.Log.Loggers.Initialize (Util.Properties.Manager (Auth_CB.Config)); -- Setup the HTTP client implementation to use AWS. Util.Http.Clients.AWS.Register; -- Setup AWS dispatchers. AWS.Services.Dispatchers.URI.Register (Dispatcher, "/atlas/auth/auth", Auth_CB.Get_Authorization'Access, Prefix => True); AWS.Services.Dispatchers.URI.Register (Dispatcher, "/verify", Auth_CB.Verify_Authorization'Access); AWS.Services.Dispatchers.URI.Register (Dispatcher, "/atlas", AWS.Services.Page_Server.Callback'Access, Prefix => True); AWS.Services.Dispatchers.URI.Register (Dispatcher, "/success", Auth_CB.User_Info'Access); AWS.Services.Web_Block.Registry.Register ("success", "samples/web/success.thtml", null); -- Configure AWS. Config := AWS.Config.Get_Current; AWS.Config.Set.Session (Config, True); AWS.Config.Set.Session_Name (Config, "AUTH_DEMO"); AWS.Config.Set.Reuse_Address (Config, True); AWS.Config.Set.WWW_Root (Config, "samples/web"); AWS.Server.Start (WS, Dispatcher => Dispatcher, Config => Config); Log.Info ("Connect you browser to: http://localhost:8080/atlas/login.html"); Log.Info ("Press 'q' key to stop the server."); AWS.Server.Wait (AWS.Server.Q_Key_Pressed); Log.Info ("Shutting down server..."); AWS.Server.Shutdown (WS); end Auth_Demo;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . E X P _ U N S -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005 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, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- ------------------------------------------------------------------------------ -- This procedure performs exponentiation of unsigned types (with binary -- modulus values up to and including that of Unsigned_Types.Unsigned). -- The result is always full width, the caller must do a masking operation -- the modulus is less than 2 ** (Unsigned'Size). with System.Unsigned_Types; package System.Exp_Uns is pragma Pure; function Exp_Unsigned (Left : System.Unsigned_Types.Unsigned; Right : Natural) return System.Unsigned_Types.Unsigned; end System.Exp_Uns;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . O S _ L I B -- -- -- -- B o d y -- -- -- -- Copyright (C) 1995-2020, 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 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. -- -- -- ------------------------------------------------------------------------------ pragma Compiler_Unit_Warning; with Ada.Unchecked_Conversion; with Ada.Unchecked_Deallocation; with System; use System; with System.Case_Util; with System.CRTL; with System.Soft_Links; package body System.OS_Lib is subtype size_t is CRTL.size_t; procedure Strncpy (dest, src : System.Address; n : size_t) renames CRTL.strncpy; -- Imported procedures Dup and Dup2 are used in procedures Spawn and -- Non_Blocking_Spawn. function Dup (Fd : File_Descriptor) return File_Descriptor; pragma Import (C, Dup, "__gnat_dup"); procedure Dup2 (Old_Fd, New_Fd : File_Descriptor); pragma Import (C, Dup2, "__gnat_dup2"); function Copy_Attributes (From : System.Address; To : System.Address; Mode : Integer) return Integer; pragma Import (C, Copy_Attributes, "__gnat_copy_attribs"); -- Mode = 0 - copy only time stamps. -- Mode = 1 - copy time stamps and read/write/execute attributes -- Mode = 2 - copy read/write/execute attributes function Is_Dirsep (C : Character) return Boolean; pragma Inline (Is_Dirsep); -- Returns True if C is a directory separator. On Windows we -- accept both \ and / as a directory separator. On_Windows : constant Boolean := Directory_Separator = '\'; -- An indication that we are on Windows. Used in Normalize_Pathname, to -- deal with drive letters in the beginning of absolute paths. package SSL renames System.Soft_Links; -- The following are used by Create_Temp_File First_Temp_File_Name : constant String := "GNAT-TEMP-000000.TMP"; -- Used to initialize Current_Temp_File_Name and Temp_File_Name_Last_Digit Current_Temp_File_Name : String := First_Temp_File_Name; -- Name of the temp file last created Temp_File_Name_Last_Digit : constant Positive := First_Temp_File_Name'Last - 4; -- Position of the last digit in Current_Temp_File_Name Max_Attempts : constant := 100; -- The maximum number of attempts to create a new temp file ----------------------- -- Local Subprograms -- ----------------------- function Args_Length (Args : Argument_List) return Natural; -- Returns total number of characters needed to create a string of all Args -- terminated by ASCII.NUL characters. procedure Create_Temp_File_Internal (FD : out File_Descriptor; Name : out String_Access; Stdout : Boolean); -- Internal routine to implement two Create_Temp_File routines. If Stdout -- is set to True the created descriptor is stdout-compatible, otherwise -- it might not be depending on the OS. The first two parameters are as -- in Create_Temp_File. function C_String_Length (S : Address) return Integer; -- Returns the length of C (null-terminated) string at S, or 0 for -- Null_Address. procedure Spawn_Internal (Program_Name : String; Args : Argument_List; Result : out Integer; Pid : out Process_Id; Blocking : Boolean); -- Internal routine to implement the two Spawn (blocking/non blocking) -- routines. If Blocking is set to True then the spawn is blocking -- otherwise it is non blocking. In this latter case the Pid contains the -- process id number. The first three parameters are as in Spawn. Note that -- Spawn_Internal normalizes the argument list before calling the low level -- system spawn routines (see Normalize_Arguments). -- -- Note: Normalize_Arguments is designed to do nothing if it is called more -- than once, so calling Normalize_Arguments before calling one of the -- spawn routines is fine. function To_Path_String_Access (Path_Addr : Address; Path_Len : Integer) return String_Access; -- Converts a C String to an Ada String. We could do this making use of -- Interfaces.C.Strings but we prefer not to import that entire package --------- -- "<" -- --------- function "<" (X, Y : OS_Time) return Boolean is begin return Long_Integer (X) < Long_Integer (Y); end "<"; ---------- -- "<=" -- ---------- function "<=" (X, Y : OS_Time) return Boolean is begin return Long_Integer (X) <= Long_Integer (Y); end "<="; --------- -- ">" -- --------- function ">" (X, Y : OS_Time) return Boolean is begin return Long_Integer (X) > Long_Integer (Y); end ">"; ---------- -- ">=" -- ---------- function ">=" (X, Y : OS_Time) return Boolean is begin return Long_Integer (X) >= Long_Integer (Y); end ">="; ----------------- -- Args_Length -- ----------------- function Args_Length (Args : Argument_List) return Natural is Len : Natural := 0; begin for J in Args'Range loop Len := Len + Args (J)'Length + 1; -- One extra for ASCII.NUL end loop; return Len; end Args_Length; ----------------------------- -- Argument_String_To_List -- ----------------------------- function Argument_String_To_List (Arg_String : String) return Argument_List_Access is Max_Args : constant Integer := Arg_String'Length; Backslash_Is_Sep : constant Boolean := Directory_Separator = '\'; -- Whether '\' is a directory separator (as on Windows), or a way to -- quote special characters. Backqd : Boolean := False; Idx : Integer; New_Argc : Natural := 0; New_Argv : Argument_List (1 .. Max_Args); Quoted : Boolean := False; Cleaned : String (1 .. Arg_String'Length); Cleaned_Idx : Natural; -- A cleaned up version of the argument. This function is taking -- backslash escapes when computing the bounds for arguments. It -- is then removing the extra backslashes from the argument. begin Idx := Arg_String'First; loop -- Skip extraneous spaces while Idx <= Arg_String'Last and then Arg_String (Idx) = ' ' loop Idx := Idx + 1; end loop; exit when Idx > Arg_String'Last; Cleaned_Idx := Cleaned'First; Backqd := False; Quoted := False; loop -- An unquoted space is the end of an argument if not (Backqd or Quoted) and then Arg_String (Idx) = ' ' then exit; -- Start of a quoted string elsif not (Backqd or Quoted) and then Arg_String (Idx) = '"' then Quoted := True; Cleaned (Cleaned_Idx) := Arg_String (Idx); Cleaned_Idx := Cleaned_Idx + 1; -- End of a quoted string and end of an argument elsif (Quoted and not Backqd) and then Arg_String (Idx) = '"' then Cleaned (Cleaned_Idx) := Arg_String (Idx); Cleaned_Idx := Cleaned_Idx + 1; Idx := Idx + 1; exit; -- Turn off backquoting after advancing one character elsif Backqd then Backqd := False; Cleaned (Cleaned_Idx) := Arg_String (Idx); Cleaned_Idx := Cleaned_Idx + 1; -- Following character is backquoted elsif not Backslash_Is_Sep and then Arg_String (Idx) = '\' then Backqd := True; else Cleaned (Cleaned_Idx) := Arg_String (Idx); Cleaned_Idx := Cleaned_Idx + 1; end if; Idx := Idx + 1; exit when Idx > Arg_String'Last; end loop; -- Found an argument New_Argc := New_Argc + 1; New_Argv (New_Argc) := new String'(Cleaned (Cleaned'First .. Cleaned_Idx - 1)); end loop; return new Argument_List'(New_Argv (1 .. New_Argc)); end Argument_String_To_List; --------------------- -- C_String_Length -- --------------------- function C_String_Length (S : Address) return Integer is begin if S = Null_Address then return 0; else return Integer (CRTL.strlen (S)); end if; end C_String_Length; ----------- -- Close -- ----------- procedure Close (FD : File_Descriptor) is use CRTL; Discard : constant int := close (int (FD)); begin null; end Close; procedure Close (FD : File_Descriptor; Status : out Boolean) is use CRTL; begin Status := (close (int (FD)) = 0); end Close; --------------- -- Copy_File -- --------------- procedure Copy_File (Name : String; Pathname : String; Success : out Boolean; Mode : Copy_Mode := Copy; Preserve : Attribute := Time_Stamps) is From : File_Descriptor; To : File_Descriptor; Copy_Error : exception; -- Internal exception raised to signal error in copy function Build_Path (Dir : String; File : String) return String; -- Returns pathname Dir concatenated with File adding the directory -- separator only if needed. procedure Copy (From : File_Descriptor; To : File_Descriptor); -- Read data from From and place them into To. In both cases the -- operations uses the current file position. Raises Constraint_Error -- if a problem occurs during the copy. procedure Copy_To (To_Name : String); -- Does a straight copy from source to designated destination file ---------------- -- Build_Path -- ---------------- function Build_Path (Dir : String; File : String) return String is Base_File_Ptr : Integer; -- The base file name is File (Base_File_Ptr + 1 .. File'Last) Res : String (1 .. Dir'Length + File'Length + 1); -- Start of processing for Build_Path begin -- Find base file name Base_File_Ptr := File'Last; while Base_File_Ptr >= File'First loop exit when Is_Dirsep (File (Base_File_Ptr)); Base_File_Ptr := Base_File_Ptr - 1; end loop; declare Base_File : String renames File (Base_File_Ptr + 1 .. File'Last); begin Res (1 .. Dir'Length) := Dir; if Is_Dirsep (Dir (Dir'Last)) then Res (Dir'Length + 1 .. Dir'Length + Base_File'Length) := Base_File; return Res (1 .. Dir'Length + Base_File'Length); else Res (Dir'Length + 1) := Directory_Separator; Res (Dir'Length + 2 .. Dir'Length + 1 + Base_File'Length) := Base_File; return Res (1 .. Dir'Length + 1 + Base_File'Length); end if; end; end Build_Path; ---------- -- Copy -- ---------- procedure Copy (From : File_Descriptor; To : File_Descriptor) is Buf_Size : constant := 200_000; type Buf is array (1 .. Buf_Size) of Character; type Buf_Ptr is access Buf; Buffer : Buf_Ptr; R : Integer; W : Integer; Status_From : Boolean; Status_To : Boolean; -- Statuses for the calls to Close procedure Free is new Ada.Unchecked_Deallocation (Buf, Buf_Ptr); begin -- Check for invalid descriptors, making sure that we do not -- accidentally leave an open file descriptor around. if From = Invalid_FD then if To /= Invalid_FD then Close (To, Status_To); end if; raise Copy_Error; elsif To = Invalid_FD then Close (From, Status_From); raise Copy_Error; end if; -- Allocate the buffer on the heap Buffer := new Buf; loop R := Read (From, Buffer (1)'Address, Buf_Size); -- On some systems, the buffer may not be full. So, we need to try -- again until there is nothing to read. exit when R = 0; W := Write (To, Buffer (1)'Address, R); if W < R then -- Problem writing data, could be a disk full. Close files -- without worrying about status, since we are raising a -- Copy_Error exception in any case. Close (From, Status_From); Close (To, Status_To); Free (Buffer); raise Copy_Error; end if; end loop; Close (From, Status_From); Close (To, Status_To); Free (Buffer); if not (Status_From and Status_To) then raise Copy_Error; end if; end Copy; ------------- -- Copy_To -- ------------- procedure Copy_To (To_Name : String) is C_From : String (1 .. Name'Length + 1); C_To : String (1 .. To_Name'Length + 1); begin From := Open_Read (Name, Binary); -- Do not clobber destination file if source file could not be opened if From /= Invalid_FD then To := Create_File (To_Name, Binary); end if; Copy (From, To); -- Copy attributes C_From (1 .. Name'Length) := Name; C_From (C_From'Last) := ASCII.NUL; C_To (1 .. To_Name'Length) := To_Name; C_To (C_To'Last) := ASCII.NUL; case Preserve is when Time_Stamps => if Copy_Attributes (C_From'Address, C_To'Address, 0) = -1 then raise Copy_Error; end if; when Full => if Copy_Attributes (C_From'Address, C_To'Address, 1) = -1 then raise Copy_Error; end if; when None => null; end case; end Copy_To; -- Start of processing for Copy_File begin Success := True; -- The source file must exist if not Is_Regular_File (Name) then raise Copy_Error; end if; -- The source file exists case Mode is -- Copy case, target file must not exist when Copy => -- If the target file exists, we have an error if Is_Regular_File (Pathname) then raise Copy_Error; -- Case of target is a directory elsif Is_Directory (Pathname) then declare Dest : constant String := Build_Path (Pathname, Name); begin -- If target file exists, we have an error, else do copy if Is_Regular_File (Dest) then raise Copy_Error; else Copy_To (Dest); end if; end; -- Case of normal copy to file (destination does not exist) else Copy_To (Pathname); end if; -- Overwrite case (destination file may or may not exist) when Overwrite => if Is_Directory (Pathname) then Copy_To (Build_Path (Pathname, Name)); else Copy_To (Pathname); end if; -- Append case (destination file may or may not exist) when Append => -- Appending to existing file if Is_Regular_File (Pathname) then -- Append mode and destination file exists, append data at the -- end of Pathname. But if we fail to open source file, do not -- touch destination file at all. From := Open_Read (Name, Binary); if From = Invalid_FD then Success := False; else To := Open_Read_Write (Pathname, Binary); Lseek (To, 0, Seek_End); Copy (From, To); end if; -- Appending to directory, not allowed elsif Is_Directory (Pathname) then raise Copy_Error; -- Appending when target file does not exist else Copy_To (Pathname); end if; end case; -- All error cases are caught here exception when Copy_Error => Success := False; end Copy_File; procedure Copy_File (Name : C_File_Name; Pathname : C_File_Name; Success : out Boolean; Mode : Copy_Mode := Copy; Preserve : Attribute := Time_Stamps) is Ada_Name : String_Access := To_Path_String_Access (Name, C_String_Length (Name)); Ada_Pathname : String_Access := To_Path_String_Access (Pathname, C_String_Length (Pathname)); begin Copy_File (Ada_Name.all, Ada_Pathname.all, Success, Mode, Preserve); Free (Ada_Name); Free (Ada_Pathname); end Copy_File; -------------------------- -- Copy_File_Attributes -- -------------------------- procedure Copy_File_Attributes (From : String; To : String; Success : out Boolean; Copy_Timestamp : Boolean := True; Copy_Permissions : Boolean := True) is F : aliased String (1 .. From'Length + 1); T : aliased String (1 .. To'Length + 1); Mode : Integer; begin if Copy_Timestamp then if Copy_Permissions then Mode := 1; else Mode := 0; end if; else if Copy_Permissions then Mode := 2; else Success := True; return; -- nothing to do end if; end if; F (1 .. From'Length) := From; F (F'Last) := ASCII.NUL; T (1 .. To'Length) := To; T (T'Last) := ASCII.NUL; Success := Copy_Attributes (F'Address, T'Address, Mode) /= -1; end Copy_File_Attributes; ---------------------- -- Copy_Time_Stamps -- ---------------------- procedure Copy_Time_Stamps (Source : String; Dest : String; Success : out Boolean) is begin if Is_Regular_File (Source) and then Is_Writable_File (Dest) then declare C_Source : String (1 .. Source'Length + 1); C_Dest : String (1 .. Dest'Length + 1); begin C_Source (1 .. Source'Length) := Source; C_Source (C_Source'Last) := ASCII.NUL; C_Dest (1 .. Dest'Length) := Dest; C_Dest (C_Dest'Last) := ASCII.NUL; if Copy_Attributes (C_Source'Address, C_Dest'Address, 0) = -1 then Success := False; else Success := True; end if; end; else Success := False; end if; end Copy_Time_Stamps; procedure Copy_Time_Stamps (Source : C_File_Name; Dest : C_File_Name; Success : out Boolean) is Ada_Source : String_Access := To_Path_String_Access (Source, C_String_Length (Source)); Ada_Dest : String_Access := To_Path_String_Access (Dest, C_String_Length (Dest)); begin Copy_Time_Stamps (Ada_Source.all, Ada_Dest.all, Success); Free (Ada_Source); Free (Ada_Dest); end Copy_Time_Stamps; ----------------- -- Create_File -- ----------------- function Create_File (Name : C_File_Name; Fmode : Mode) return File_Descriptor is function C_Create_File (Name : C_File_Name; Fmode : Mode) return File_Descriptor; pragma Import (C, C_Create_File, "__gnat_open_create"); begin return C_Create_File (Name, Fmode); end Create_File; function Create_File (Name : String; Fmode : Mode) return File_Descriptor is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return Create_File (C_Name (C_Name'First)'Address, Fmode); end Create_File; --------------------- -- Create_New_File -- --------------------- function Create_New_File (Name : C_File_Name; Fmode : Mode) return File_Descriptor is function C_Create_New_File (Name : C_File_Name; Fmode : Mode) return File_Descriptor; pragma Import (C, C_Create_New_File, "__gnat_open_new"); begin return C_Create_New_File (Name, Fmode); end Create_New_File; function Create_New_File (Name : String; Fmode : Mode) return File_Descriptor is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return Create_New_File (C_Name (C_Name'First)'Address, Fmode); end Create_New_File; ----------------------------- -- Create_Output_Text_File -- ----------------------------- function Create_Output_Text_File (Name : String) return File_Descriptor is function C_Create_File (Name : C_File_Name) return File_Descriptor; pragma Import (C, C_Create_File, "__gnat_create_output_file"); C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return C_Create_File (C_Name (C_Name'First)'Address); end Create_Output_Text_File; ---------------------- -- Create_Temp_File -- ---------------------- procedure Create_Temp_File (FD : out File_Descriptor; Name : out Temp_File_Name) is function Open_New_Temp (Name : System.Address; Fmode : Mode) return File_Descriptor; pragma Import (C, Open_New_Temp, "__gnat_open_new_temp"); begin FD := Open_New_Temp (Name'Address, Binary); end Create_Temp_File; procedure Create_Temp_File (FD : out File_Descriptor; Name : out String_Access) is begin Create_Temp_File_Internal (FD, Name, Stdout => False); end Create_Temp_File; ----------------------------- -- Create_Temp_Output_File -- ----------------------------- procedure Create_Temp_Output_File (FD : out File_Descriptor; Name : out String_Access) is begin Create_Temp_File_Internal (FD, Name, Stdout => True); end Create_Temp_Output_File; ------------------------------- -- Create_Temp_File_Internal -- ------------------------------- procedure Create_Temp_File_Internal (FD : out File_Descriptor; Name : out String_Access; Stdout : Boolean) is Pos : Positive; Attempts : Natural := 0; Current : String (Current_Temp_File_Name'Range); function Create_New_Output_Text_File (Name : String) return File_Descriptor; -- Similar to Create_Output_Text_File, except it fails if the file -- already exists. We need this behavior to ensure we don't accidentally -- open a temp file that has just been created by a concurrently running -- process. There is no point exposing this function, as it's generally -- not particularly useful. --------------------------------- -- Create_New_Output_Text_File -- --------------------------------- function Create_New_Output_Text_File (Name : String) return File_Descriptor is function C_Create_File (Name : C_File_Name) return File_Descriptor; pragma Import (C, C_Create_File, "__gnat_create_output_file_new"); C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return C_Create_File (C_Name (C_Name'First)'Address); end Create_New_Output_Text_File; -- Start of processing for Create_Temp_File_Internal begin -- Loop until a new temp file can be created File_Loop : loop Locked : begin -- We need to protect global variable Current_Temp_File_Name -- against concurrent access by different tasks. SSL.Lock_Task.all; -- Start at the last digit Pos := Temp_File_Name_Last_Digit; Digit_Loop : loop -- Increment the digit by one case Current_Temp_File_Name (Pos) is when '0' .. '8' => Current_Temp_File_Name (Pos) := Character'Succ (Current_Temp_File_Name (Pos)); exit Digit_Loop; when '9' => -- For 9, set the digit to 0 and go to the previous digit Current_Temp_File_Name (Pos) := '0'; Pos := Pos - 1; when others => -- If it is not a digit, then there are no available -- temp file names. Return Invalid_FD. There is almost no -- chance that this code will be ever be executed, since -- it would mean that there are one million temp files in -- the same directory. SSL.Unlock_Task.all; FD := Invalid_FD; Name := null; exit File_Loop; end case; end loop Digit_Loop; Current := Current_Temp_File_Name; -- We can now release the lock, because we are no longer accessing -- Current_Temp_File_Name. SSL.Unlock_Task.all; exception when others => SSL.Unlock_Task.all; raise; end Locked; -- Attempt to create the file if Stdout then FD := Create_New_Output_Text_File (Current); else FD := Create_New_File (Current, Binary); end if; if FD /= Invalid_FD then Name := new String'(Current); exit File_Loop; end if; if not Is_Regular_File (Current) then -- If the file does not already exist and we are unable to create -- it, we give up after Max_Attempts. Otherwise, we try again with -- the next available file name. Attempts := Attempts + 1; if Attempts >= Max_Attempts then FD := Invalid_FD; Name := null; exit File_Loop; end if; end if; end loop File_Loop; end Create_Temp_File_Internal; ------------------------- -- Current_Time_String -- ------------------------- function Current_Time_String return String is subtype S23 is String (1 .. 23); -- Holds current time in ISO 8601 format YYYY-MM-DD HH:MM:SS.SS + NUL procedure Current_Time_String (Time : System.Address); pragma Import (C, Current_Time_String, "__gnat_current_time_string"); -- Puts current time into Time in above ISO 8601 format Result23 : aliased S23; -- Current time in ISO 8601 format begin Current_Time_String (Result23'Address); return Result23 (1 .. 19); end Current_Time_String; ----------------- -- Delete_File -- ----------------- procedure Delete_File (Name : Address; Success : out Boolean) is R : Integer; begin R := System.CRTL.unlink (Name); Success := (R = 0); end Delete_File; procedure Delete_File (Name : String; Success : out Boolean) is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; Delete_File (C_Name'Address, Success); end Delete_File; ------------------- -- Errno_Message -- ------------------- function Errno_Message (Err : Integer := Errno; Default : String := "") return String is function strerror (errnum : Integer) return System.Address; pragma Import (C, strerror, "strerror"); C_Msg : constant System.Address := strerror (Err); begin if C_Msg = Null_Address then if Default /= "" then return Default; else -- Note: for bootstrap reasons, it is impractical -- to use Integer'Image here. declare Val : Integer; First : Integer; Buf : String (1 .. 20); -- Buffer large enough to hold image of largest Integer values begin Val := abs Err; First := Buf'Last; loop Buf (First) := Character'Val (Character'Pos ('0') + Val mod 10); Val := Val / 10; exit when Val = 0; First := First - 1; end loop; if Err < 0 then First := First - 1; Buf (First) := '-'; end if; return "errno = " & Buf (First .. Buf'Last); end; end if; else declare Msg : String (1 .. Integer (CRTL.strlen (C_Msg))); for Msg'Address use C_Msg; pragma Import (Ada, Msg); begin return Msg; end; end if; end Errno_Message; --------------------- -- File_Time_Stamp -- --------------------- function File_Time_Stamp (FD : File_Descriptor) return OS_Time is function File_Time (FD : File_Descriptor) return OS_Time; pragma Import (C, File_Time, "__gnat_file_time_fd"); begin return File_Time (FD); end File_Time_Stamp; function File_Time_Stamp (Name : C_File_Name) return OS_Time is function File_Time (Name : Address) return OS_Time; pragma Import (C, File_Time, "__gnat_file_time_name"); begin return File_Time (Name); end File_Time_Stamp; function File_Time_Stamp (Name : String) return OS_Time is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return File_Time_Stamp (F_Name'Address); end File_Time_Stamp; --------------------------- -- Get_Debuggable_Suffix -- --------------------------- function Get_Debuggable_Suffix return String_Access is procedure Get_Suffix_Ptr (Length, Ptr : Address); pragma Import (C, Get_Suffix_Ptr, "__gnat_get_debuggable_suffix_ptr"); Result : String_Access; Suffix_Length : Integer; Suffix_Ptr : Address; begin Get_Suffix_Ptr (Suffix_Length'Address, Suffix_Ptr'Address); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Suffix_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Debuggable_Suffix; --------------------------- -- Get_Executable_Suffix -- --------------------------- function Get_Executable_Suffix return String_Access is procedure Get_Suffix_Ptr (Length, Ptr : Address); pragma Import (C, Get_Suffix_Ptr, "__gnat_get_executable_suffix_ptr"); Result : String_Access; Suffix_Length : Integer; Suffix_Ptr : Address; begin Get_Suffix_Ptr (Suffix_Length'Address, Suffix_Ptr'Address); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Suffix_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Executable_Suffix; ----------------------- -- Get_Object_Suffix -- ----------------------- function Get_Object_Suffix return String_Access is procedure Get_Suffix_Ptr (Length, Ptr : Address); pragma Import (C, Get_Suffix_Ptr, "__gnat_get_object_suffix_ptr"); Result : String_Access; Suffix_Length : Integer; Suffix_Ptr : Address; begin Get_Suffix_Ptr (Suffix_Length'Address, Suffix_Ptr'Address); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Suffix_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Object_Suffix; ---------------------------------- -- Get_Target_Debuggable_Suffix -- ---------------------------------- function Get_Target_Debuggable_Suffix return String_Access is Target_Exec_Ext_Ptr : Address; pragma Import (C, Target_Exec_Ext_Ptr, "__gnat_target_debuggable_extension"); Result : String_Access; Suffix_Length : Integer; begin Suffix_Length := Integer (CRTL.strlen (Target_Exec_Ext_Ptr)); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Target_Exec_Ext_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Target_Debuggable_Suffix; ---------------------------------- -- Get_Target_Executable_Suffix -- ---------------------------------- function Get_Target_Executable_Suffix return String_Access is Target_Exec_Ext_Ptr : Address; pragma Import (C, Target_Exec_Ext_Ptr, "__gnat_target_executable_extension"); Result : String_Access; Suffix_Length : Integer; begin Suffix_Length := Integer (CRTL.strlen (Target_Exec_Ext_Ptr)); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Target_Exec_Ext_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Target_Executable_Suffix; ------------------------------ -- Get_Target_Object_Suffix -- ------------------------------ function Get_Target_Object_Suffix return String_Access is Target_Object_Ext_Ptr : Address; pragma Import (C, Target_Object_Ext_Ptr, "__gnat_target_object_extension"); Result : String_Access; Suffix_Length : Integer; begin Suffix_Length := Integer (CRTL.strlen (Target_Object_Ext_Ptr)); Result := new String (1 .. Suffix_Length); if Suffix_Length > 0 then Strncpy (Result.all'Address, Target_Object_Ext_Ptr, size_t (Suffix_Length)); end if; return Result; end Get_Target_Object_Suffix; ------------ -- Getenv -- ------------ function Getenv (Name : String) return String_Access is procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address); pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv"); Env_Value_Ptr : aliased Address; Env_Value_Length : aliased Integer; F_Name : aliased String (1 .. Name'Length + 1); Result : String_Access; begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; Get_Env_Value_Ptr (F_Name'Address, Env_Value_Length'Address, Env_Value_Ptr'Address); Result := new String (1 .. Env_Value_Length); if Env_Value_Length > 0 then Strncpy (Result.all'Address, Env_Value_Ptr, size_t (Env_Value_Length)); end if; return Result; end Getenv; ------------ -- GM_Day -- ------------ function GM_Day (Date : OS_Time) return Day_Type is D : Day_Type; Y : Year_Type; Mo : Month_Type; H : Hour_Type; Mn : Minute_Type; S : Second_Type; pragma Unreferenced (Y, Mo, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return D; end GM_Day; ------------- -- GM_Hour -- ------------- function GM_Hour (Date : OS_Time) return Hour_Type is H : Hour_Type; Y : Year_Type; Mo : Month_Type; D : Day_Type; Mn : Minute_Type; S : Second_Type; pragma Unreferenced (Y, Mo, D, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return H; end GM_Hour; --------------- -- GM_Minute -- --------------- function GM_Minute (Date : OS_Time) return Minute_Type is Mn : Minute_Type; Y : Year_Type; Mo : Month_Type; D : Day_Type; H : Hour_Type; S : Second_Type; pragma Unreferenced (Y, Mo, D, H, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return Mn; end GM_Minute; -------------- -- GM_Month -- -------------- function GM_Month (Date : OS_Time) return Month_Type is Mo : Month_Type; Y : Year_Type; D : Day_Type; H : Hour_Type; Mn : Minute_Type; S : Second_Type; pragma Unreferenced (Y, D, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return Mo; end GM_Month; --------------- -- GM_Second -- --------------- function GM_Second (Date : OS_Time) return Second_Type is S : Second_Type; Y : Year_Type; Mo : Month_Type; D : Day_Type; H : Hour_Type; Mn : Minute_Type; pragma Unreferenced (Y, Mo, D, H, Mn); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return S; end GM_Second; -------------- -- GM_Split -- -------------- procedure GM_Split (Date : OS_Time; Year : out Year_Type; Month : out Month_Type; Day : out Day_Type; Hour : out Hour_Type; Minute : out Minute_Type; Second : out Second_Type) is procedure To_GM_Time (P_Time_T : Address; P_Year : Address; P_Month : Address; P_Day : Address; P_Hours : Address; P_Mins : Address; P_Secs : Address); pragma Import (C, To_GM_Time, "__gnat_to_gm_time"); T : OS_Time := Date; Y : Integer; Mo : Integer; D : Integer; H : Integer; Mn : Integer; S : Integer; begin -- Use the global lock because To_GM_Time is not thread safe Locked_Processing : begin SSL.Lock_Task.all; To_GM_Time (P_Time_T => T'Address, P_Year => Y'Address, P_Month => Mo'Address, P_Day => D'Address, P_Hours => H'Address, P_Mins => Mn'Address, P_Secs => S'Address); SSL.Unlock_Task.all; exception when others => SSL.Unlock_Task.all; raise; end Locked_Processing; Year := Y + 1900; Month := Mo + 1; Day := D; Hour := H; Minute := Mn; Second := S; end GM_Split; ---------------- -- GM_Time_Of -- ---------------- function GM_Time_Of (Year : Year_Type; Month : Month_Type; Day : Day_Type; Hour : Hour_Type; Minute : Minute_Type; Second : Second_Type) return OS_Time is procedure To_OS_Time (P_Time_T : Address; P_Year : Integer; P_Month : Integer; P_Day : Integer; P_Hours : Integer; P_Mins : Integer; P_Secs : Integer); pragma Import (C, To_OS_Time, "__gnat_to_os_time"); Result : OS_Time; begin To_OS_Time (P_Time_T => Result'Address, P_Year => Year - 1900, P_Month => Month - 1, P_Day => Day, P_Hours => Hour, P_Mins => Minute, P_Secs => Second); return Result; end GM_Time_Of; ------------- -- GM_Year -- ------------- function GM_Year (Date : OS_Time) return Year_Type is Y : Year_Type; Mo : Month_Type; D : Day_Type; H : Hour_Type; Mn : Minute_Type; S : Second_Type; pragma Unreferenced (Mo, D, H, Mn, S); begin GM_Split (Date, Y, Mo, D, H, Mn, S); return Y; end GM_Year; ---------------------- -- Is_Absolute_Path -- ---------------------- function Is_Absolute_Path (Name : String) return Boolean is function Is_Absolute_Path (Name : Address; Length : Integer) return Integer; pragma Import (C, Is_Absolute_Path, "__gnat_is_absolute_path"); begin return Is_Absolute_Path (Name'Address, Name'Length) /= 0; end Is_Absolute_Path; --------------- -- Is_Dirsep -- --------------- function Is_Dirsep (C : Character) return Boolean is begin return C = Directory_Separator or else C = '/'; end Is_Dirsep; ------------------ -- Is_Directory -- ------------------ function Is_Directory (Name : C_File_Name) return Boolean is function Is_Directory (Name : Address) return Integer; pragma Import (C, Is_Directory, "__gnat_is_directory"); begin return Is_Directory (Name) /= 0; end Is_Directory; function Is_Directory (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Directory (F_Name'Address); end Is_Directory; ----------------------------- -- Is_Read_Accessible_File -- ----------------------------- function Is_Read_Accessible_File (Name : String) return Boolean is function Is_Read_Accessible_File (Name : Address) return Integer; pragma Import (C, Is_Read_Accessible_File, "__gnat_is_read_accessible_file"); F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Read_Accessible_File (F_Name'Address) /= 0; end Is_Read_Accessible_File; ---------------------------- -- Is_Owner_Readable_File -- ---------------------------- function Is_Owner_Readable_File (Name : C_File_Name) return Boolean is function Is_Readable_File (Name : Address) return Integer; pragma Import (C, Is_Readable_File, "__gnat_is_readable_file"); begin return Is_Readable_File (Name) /= 0; end Is_Owner_Readable_File; function Is_Owner_Readable_File (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Owner_Readable_File (F_Name'Address); end Is_Owner_Readable_File; ------------------------ -- Is_Executable_File -- ------------------------ function Is_Executable_File (Name : C_File_Name) return Boolean is function Is_Executable_File (Name : Address) return Integer; pragma Import (C, Is_Executable_File, "__gnat_is_executable_file"); begin return Is_Executable_File (Name) /= 0; end Is_Executable_File; function Is_Executable_File (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Executable_File (F_Name'Address); end Is_Executable_File; --------------------- -- Is_Regular_File -- --------------------- function Is_Regular_File (Name : C_File_Name) return Boolean is function Is_Regular_File (Name : Address) return Integer; pragma Import (C, Is_Regular_File, "__gnat_is_regular_file"); begin return Is_Regular_File (Name) /= 0; end Is_Regular_File; function Is_Regular_File (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Regular_File (F_Name'Address); end Is_Regular_File; ---------------------- -- Is_Symbolic_Link -- ---------------------- function Is_Symbolic_Link (Name : C_File_Name) return Boolean is function Is_Symbolic_Link (Name : Address) return Integer; pragma Import (C, Is_Symbolic_Link, "__gnat_is_symbolic_link"); begin return Is_Symbolic_Link (Name) /= 0; end Is_Symbolic_Link; function Is_Symbolic_Link (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Symbolic_Link (F_Name'Address); end Is_Symbolic_Link; ------------------------------ -- Is_Write_Accessible_File -- ------------------------------ function Is_Write_Accessible_File (Name : String) return Boolean is function Is_Write_Accessible_File (Name : Address) return Integer; pragma Import (C, Is_Write_Accessible_File, "__gnat_is_write_accessible_file"); F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Write_Accessible_File (F_Name'Address) /= 0; end Is_Write_Accessible_File; ---------------------------- -- Is_Owner_Writable_File -- ---------------------------- function Is_Owner_Writable_File (Name : C_File_Name) return Boolean is function Is_Writable_File (Name : Address) return Integer; pragma Import (C, Is_Writable_File, "__gnat_is_writable_file"); begin return Is_Writable_File (Name) /= 0; end Is_Owner_Writable_File; function Is_Owner_Writable_File (Name : String) return Boolean is F_Name : String (1 .. Name'Length + 1); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; return Is_Owner_Writable_File (F_Name'Address); end Is_Owner_Writable_File; ---------- -- Kill -- ---------- procedure Kill (Pid : Process_Id; Hard_Kill : Boolean := True) is SIGKILL : constant := 9; SIGINT : constant := 2; procedure C_Kill (Pid : Process_Id; Sig_Num : Integer; Close : Integer); pragma Import (C, C_Kill, "__gnat_kill"); begin if Pid /= Invalid_Pid then if Hard_Kill then C_Kill (Pid, SIGKILL, 1); else C_Kill (Pid, SIGINT, 1); end if; end if; end Kill; ----------------------- -- Kill_Process_Tree -- ----------------------- procedure Kill_Process_Tree (Pid : Process_Id; Hard_Kill : Boolean := True) is SIGKILL : constant := 9; SIGINT : constant := 2; procedure C_Kill_PT (Pid : Process_Id; Sig_Num : Integer); pragma Import (C, C_Kill_PT, "__gnat_killprocesstree"); begin if Hard_Kill then C_Kill_PT (Pid, SIGKILL); else C_Kill_PT (Pid, SIGINT); end if; end Kill_Process_Tree; ------------------------- -- Locate_Exec_On_Path -- ------------------------- function Locate_Exec_On_Path (Exec_Name : String) return String_Access is function Locate_Exec_On_Path (C_Exec_Name : Address) return Address; pragma Import (C, Locate_Exec_On_Path, "__gnat_locate_exec_on_path"); C_Exec_Name : String (1 .. Exec_Name'Length + 1); Path_Addr : Address; Path_Len : Integer; Result : String_Access; begin C_Exec_Name (1 .. Exec_Name'Length) := Exec_Name; C_Exec_Name (C_Exec_Name'Last) := ASCII.NUL; Path_Addr := Locate_Exec_On_Path (C_Exec_Name'Address); Path_Len := C_String_Length (Path_Addr); if Path_Len = 0 then return null; else Result := To_Path_String_Access (Path_Addr, Path_Len); CRTL.free (Path_Addr); -- Always return an absolute path name if not Is_Absolute_Path (Result.all) then declare Absolute_Path : constant String := Normalize_Pathname (Result.all, Resolve_Links => False); begin Free (Result); Result := new String'(Absolute_Path); end; end if; return Result; end if; end Locate_Exec_On_Path; ------------------------- -- Locate_Regular_File -- ------------------------- function Locate_Regular_File (File_Name : C_File_Name; Path : C_File_Name) return String_Access is function Locate_Regular_File (C_File_Name, Path_Val : Address) return Address; pragma Import (C, Locate_Regular_File, "__gnat_locate_regular_file"); Path_Addr : Address; Path_Len : Integer; Result : String_Access; begin Path_Addr := Locate_Regular_File (File_Name, Path); Path_Len := C_String_Length (Path_Addr); if Path_Len = 0 then return null; else Result := To_Path_String_Access (Path_Addr, Path_Len); CRTL.free (Path_Addr); return Result; end if; end Locate_Regular_File; function Locate_Regular_File (File_Name : String; Path : String) return String_Access is C_File_Name : String (1 .. File_Name'Length + 1); C_Path : String (1 .. Path'Length + 1); Result : String_Access; begin C_File_Name (1 .. File_Name'Length) := File_Name; C_File_Name (C_File_Name'Last) := ASCII.NUL; C_Path (1 .. Path'Length) := Path; C_Path (C_Path'Last) := ASCII.NUL; Result := Locate_Regular_File (C_File_Name'Address, C_Path'Address); -- Always return an absolute path name if Result /= null and then not Is_Absolute_Path (Result.all) then declare Absolute_Path : constant String := Normalize_Pathname (Result.all); begin Free (Result); Result := new String'(Absolute_Path); end; end if; return Result; end Locate_Regular_File; ------------------------ -- Non_Blocking_Spawn -- ------------------------ function Non_Blocking_Spawn (Program_Name : String; Args : Argument_List) return Process_Id is Junk : Integer; pragma Warnings (Off, Junk); Pid : Process_Id; begin Spawn_Internal (Program_Name, Args, Junk, Pid, Blocking => False); return Pid; end Non_Blocking_Spawn; function Non_Blocking_Spawn (Program_Name : String; Args : Argument_List; Output_File_Descriptor : File_Descriptor; Err_To_Out : Boolean := True) return Process_Id is Pid : Process_Id; Saved_Error : File_Descriptor := Invalid_FD; -- prevent warning Saved_Output : File_Descriptor; begin if Output_File_Descriptor = Invalid_FD then return Invalid_Pid; end if; -- Set standard output and, if specified, error to the temporary file Saved_Output := Dup (Standout); Dup2 (Output_File_Descriptor, Standout); if Err_To_Out then Saved_Error := Dup (Standerr); Dup2 (Output_File_Descriptor, Standerr); end if; -- Spawn the program Pid := Non_Blocking_Spawn (Program_Name, Args); -- Restore the standard output and error Dup2 (Saved_Output, Standout); if Err_To_Out then Dup2 (Saved_Error, Standerr); end if; -- And close the saved standard output and error file descriptors Close (Saved_Output); if Err_To_Out then Close (Saved_Error); end if; return Pid; end Non_Blocking_Spawn; function Non_Blocking_Spawn (Program_Name : String; Args : Argument_List; Output_File : String; Err_To_Out : Boolean := True) return Process_Id is Output_File_Descriptor : constant File_Descriptor := Create_Output_Text_File (Output_File); Result : Process_Id; begin -- Do not attempt to spawn if the output file could not be created if Output_File_Descriptor = Invalid_FD then return Invalid_Pid; else Result := Non_Blocking_Spawn (Program_Name, Args, Output_File_Descriptor, Err_To_Out); -- Close the file just created for the output, as the file descriptor -- cannot be used anywhere, being a local value. It is safe to do -- that, as the file descriptor has been duplicated to form -- standard output and error of the spawned process. Close (Output_File_Descriptor); return Result; end if; end Non_Blocking_Spawn; function Non_Blocking_Spawn (Program_Name : String; Args : Argument_List; Stdout_File : String; Stderr_File : String) return Process_Id is Stderr_FD : constant File_Descriptor := Create_Output_Text_File (Stderr_File); Stdout_FD : constant File_Descriptor := Create_Output_Text_File (Stdout_File); Result : Process_Id; Saved_Error : File_Descriptor; Saved_Output : File_Descriptor; Dummy_Status : Boolean; begin -- Do not attempt to spawn if the output files could not be created if Stdout_FD = Invalid_FD or else Stderr_FD = Invalid_FD then return Invalid_Pid; end if; -- Set standard output and error to the specified files Saved_Output := Dup (Standout); Dup2 (Stdout_FD, Standout); Saved_Error := Dup (Standerr); Dup2 (Stderr_FD, Standerr); Set_Close_On_Exec (Saved_Output, True, Dummy_Status); Set_Close_On_Exec (Saved_Error, True, Dummy_Status); -- Close the files just created for the output, as the file descriptors -- cannot be used anywhere, being local values. It is safe to do that, -- as the file descriptors have been duplicated to form standard output -- and standard error of the spawned process. Close (Stdout_FD); Close (Stderr_FD); -- Spawn the program Result := Non_Blocking_Spawn (Program_Name, Args); -- Restore the standard output and error Dup2 (Saved_Output, Standout); Dup2 (Saved_Error, Standerr); -- And close the saved standard output and error file descriptors Close (Saved_Output); Close (Saved_Error); return Result; end Non_Blocking_Spawn; ------------------------------- -- Non_Blocking_Wait_Process -- ------------------------------- procedure Non_Blocking_Wait_Process (Pid : out Process_Id; Success : out Boolean) is Status : Integer; function Portable_No_Block_Wait (S : Address) return Process_Id; pragma Import (C, Portable_No_Block_Wait, "__gnat_portable_no_block_wait"); begin Pid := Portable_No_Block_Wait (Status'Address); Success := (Status = 0); if Pid = 0 then Pid := Invalid_Pid; end if; end Non_Blocking_Wait_Process; ------------------------- -- Normalize_Arguments -- ------------------------- procedure Normalize_Arguments (Args : in out Argument_List) is procedure Quote_Argument (Arg : in out String_Access); -- Add quote around argument if it contains spaces (or HT characters) C_Argument_Needs_Quote : Integer; pragma Import (C, C_Argument_Needs_Quote, "__gnat_argument_needs_quote"); Argument_Needs_Quote : constant Boolean := C_Argument_Needs_Quote /= 0; -------------------- -- Quote_Argument -- -------------------- procedure Quote_Argument (Arg : in out String_Access) is J : Positive := 1; Quote_Needed : Boolean := False; Res : String (1 .. Arg'Length * 2); begin if Arg (Arg'First) /= '"' or else Arg (Arg'Last) /= '"' then -- Starting quote Res (J) := '"'; for K in Arg'Range loop J := J + 1; if Arg (K) = '"' then Res (J) := '\'; J := J + 1; Res (J) := '"'; Quote_Needed := True; elsif Arg (K) = ' ' or else Arg (K) = ASCII.HT then Res (J) := Arg (K); Quote_Needed := True; else Res (J) := Arg (K); end if; end loop; if Quote_Needed then -- Case of null terminated string if Res (J) = ASCII.NUL then -- If the string ends with \, double it pragma Annotate (CodePeer, Modified, Res (J - 1)); if Res (J - 1) = '\' then Res (J) := '\'; J := J + 1; end if; -- Put a quote just before the null at the end Res (J) := '"'; J := J + 1; Res (J) := ASCII.NUL; -- If argument is terminated by '\', then double it. Otherwise -- the ending quote will be taken as-is. This is quite strange -- spawn behavior from Windows, but this is what we see. else if Res (J) = '\' then J := J + 1; Res (J) := '\'; end if; -- Ending quote J := J + 1; Res (J) := '"'; end if; declare Old : String_Access := Arg; begin Arg := new String'(Res (1 .. J)); Free (Old); end; end if; end if; end Quote_Argument; -- Start of processing for Normalize_Arguments begin if Argument_Needs_Quote then for K in Args'Range loop if Args (K) /= null and then Args (K)'Length /= 0 then Quote_Argument (Args (K)); end if; end loop; end if; end Normalize_Arguments; ------------------------ -- Normalize_Pathname -- ------------------------ function Normalize_Pathname (Name : String; Directory : String := ""; Resolve_Links : Boolean := True; Case_Sensitive : Boolean := True) return String is procedure Get_Current_Dir (Dir : System.Address; Length : System.Address); pragma Import (C, Get_Current_Dir, "__gnat_get_current_dir"); function Get_File_Names_Case_Sensitive return Integer; pragma Import (C, Get_File_Names_Case_Sensitive, "__gnat_get_file_names_case_sensitive"); Max_Path : Integer; pragma Import (C, Max_Path, "__gnat_max_path_len"); -- Maximum length of a path name function Readlink (Path : System.Address; Buf : System.Address; Bufsiz : size_t) return Integer; pragma Import (C, Readlink, "__gnat_readlink"); Fold_To_Lower_Case : constant Boolean := not Case_Sensitive and then Get_File_Names_Case_Sensitive = 0; Cur_Dir_Len : Natural := 0; End_Path : Natural := Name'Length; Last : Positive := 1; Path_Buffer : String (1 .. End_Path + 2 * Max_Path + 4); -- We need to potentially store in this buffer the following elements: -- the path itself, the current directory if the path is relative, -- and additional fragments up to Max_Path in length in case -- there are any symlinks. function Final_Value (S : String) return String; -- Make final adjustment to the returned string. This function strips -- trailing directory separators, and folds returned string to lower -- case if required. procedure Fill_Directory (Drive_Only : Boolean := False); -- Fill Cur_Dir and Cur_Dir_Len with Directory and ending directory -- separator or with current directory if Directory is not defined. -- If Drive_Only is True takes only Drive letter with colon and -- directory separator from Directory parameter or from current -- directory if Directory parameter is empty. function Is_With_Drive (Name : String) return Boolean; pragma Inline (Is_With_Drive); -- Returns True only if the Name is including a drive -- letter at start. function Missed_Drive_Letter (Name : String) return Boolean; -- Missed drive letter at start of the normalized pathname ------------------- -- Is_With_Drive -- ------------------- function Is_With_Drive (Name : String) return Boolean is begin return Name'Length > 1 and then Name (Name'First + 1) = ':' and then (Name (Name'First) in 'a' .. 'z' or else Name (Name'First) in 'A' .. 'Z'); end Is_With_Drive; ------------------------- -- Missed_Drive_Letter -- ------------------------- function Missed_Drive_Letter (Name : String) return Boolean is begin return On_Windows and then not Is_With_Drive (Name) and then (Name'Length < 2 -- not \\name case or else Name (Name'First .. Name'First + 1) /= Directory_Separator & Directory_Separator); end Missed_Drive_Letter; ----------------- -- Final_Value -- ----------------- function Final_Value (S : String) return String is S1 : String := S; -- We may need to fold S to lower case, so we need a variable Last : Natural; begin if Fold_To_Lower_Case then System.Case_Util.To_Lower (S1); end if; -- Remove trailing directory separator, if any Last := S1'Last; if Last > 1 and then Is_Dirsep (S1 (Last)) and then not (On_Windows -- Special case for Windows: C:\ and then Last = 3 and then S1 (1) /= Directory_Separator and then S1 (2) = ':') then Last := Last - 1; end if; -- And ensure that there is a trailing directory separator if the -- path contains only a drive letter. if On_Windows and then Last = 2 and then S1 (1) /= Directory_Separator and then S1 (2) = ':' then return S1 (1 .. Last) & Directory_Separator; else return S1 (1 .. Last); end if; end Final_Value; -------------------- -- Fill_Directory -- -------------------- procedure Fill_Directory (Drive_Only : Boolean := False) is begin if Drive_Only and then Is_With_Drive (Directory) then Path_Buffer (1 .. 3) := Directory (Directory'First .. Directory'First + 2); elsif Directory = "" or else not Is_Absolute_Path (Directory) or else Missed_Drive_Letter (Directory) then -- Directory name not given or it is not absolute or without drive -- letter on Windows, get current directory. Cur_Dir_Len := Max_Path; Get_Current_Dir (Path_Buffer'Address, Cur_Dir_Len'Address); if Cur_Dir_Len = 0 then raise Program_Error; end if; if not Resolve_Links then Last := Cur_Dir_Len; end if; if not Drive_Only and then Directory /= "" then if On_Windows and then Is_Absolute_Path (Directory) then -- Drive letter taken from current directory but directory -- itself taken from Directory parameter. Path_Buffer (3 .. Directory'Length + 2) := Directory; Cur_Dir_Len := Directory'Length + 2; Last := 3; else -- Append relative Directory to current directory Path_Buffer (Cur_Dir_Len + 1 .. Cur_Dir_Len + Directory'Length) := Directory; Cur_Dir_Len := Cur_Dir_Len + Directory'Length; end if; end if; elsif Directory'Length >= Path_Buffer'Length then raise Constraint_Error with "Directory name to big"; else Path_Buffer (1 .. Directory'Length) := Directory; Cur_Dir_Len := Directory'Length; end if; if Drive_Only then -- When we need only drive letter from current directory on -- Windows Cur_Dir_Len := 3; Last := Cur_Dir_Len; elsif not Is_Dirsep (Path_Buffer (Cur_Dir_Len)) then Cur_Dir_Len := Cur_Dir_Len + 1; Path_Buffer (Cur_Dir_Len) := Directory_Separator; end if; end Fill_Directory; -- Local variables Max_Iterations : constant := 500; Link_Buffer : String (1 .. Max_Path + 2); Finish : Positive; Start : Positive; Status : Integer; -- Start of processing for Normalize_Pathname begin -- Special case, return null if name is null if End_Path = 0 then return ""; end if; if Is_Absolute_Path (Name) then if Missed_Drive_Letter (Name) then Fill_Directory (Drive_Only => True); -- Take only drive letter part with colon End_Path := End_Path + 2; Path_Buffer (3 .. End_Path) := Name; else Path_Buffer (1 .. End_Path) := Name; end if; else -- If this is a relative pathname, prepend current directory Fill_Directory; Path_Buffer (Cur_Dir_Len + 1 .. Cur_Dir_Len + End_Path) := Name; End_Path := Cur_Dir_Len + End_Path; end if; -- Special handling for Windows: -- * Replace all '/' by '\' -- * Check the drive letter -- * Remove all double-quotes if On_Windows then -- Replace all '/' by '\' for Index in 1 .. End_Path loop if Path_Buffer (Index) = '/' then Path_Buffer (Index) := Directory_Separator; end if; end loop; -- Ensure drive letter is upper-case pragma Assert (Path_Buffer (2) = ':'); if Path_Buffer (1) in 'a' .. 'z' then System.Case_Util.To_Upper (Path_Buffer (1 .. 1)); end if; -- Remove all double-quotes that are possibly part of the -- path but can cause problems with other methods. declare Index : Natural; begin Index := Path_Buffer'First; for Current in Path_Buffer'First .. End_Path loop if Path_Buffer (Current) /= '"' then Path_Buffer (Index) := Path_Buffer (Current); Index := Index + 1; end if; end loop; End_Path := Index - 1; end; end if; -- Start the conversions -- If this is not finished after Max_Iterations, give up and return an -- empty string. for J in 1 .. Max_Iterations loop Start := Last + 1; Finish := Last; -- Ensure that Windows UNC path is preserved, e.g: \\server\drive-c if Start = 2 and then Directory_Separator = '\' and then Path_Buffer (1 .. 2) = "\\" then Start := 3; end if; -- If we have traversed the full pathname, return it if Start > End_Path then return Final_Value (Path_Buffer (1 .. End_Path)); end if; -- Remove duplicate directory separators while Path_Buffer (Start) = Directory_Separator loop if Start = End_Path then return Final_Value (Path_Buffer (1 .. End_Path - 1)); else Path_Buffer (Start .. End_Path - 1) := Path_Buffer (Start + 1 .. End_Path); End_Path := End_Path - 1; end if; end loop; -- Find the end of the current field: last character or the one -- preceding the next directory separator. while Finish < End_Path and then Path_Buffer (Finish + 1) /= Directory_Separator loop Finish := Finish + 1; end loop; -- Remove "." field if Start = Finish and then Path_Buffer (Start) = '.' then if Start = End_Path then if Last = 1 then return (1 => Directory_Separator); else if Fold_To_Lower_Case then System.Case_Util.To_Lower (Path_Buffer (1 .. Last - 1)); end if; return Path_Buffer (1 .. Last - 1); end if; else Path_Buffer (Last + 1 .. End_Path - 2) := Path_Buffer (Last + 3 .. End_Path); End_Path := End_Path - 2; end if; -- Remove ".." fields elsif Finish = Start + 1 and then Path_Buffer (Start .. Finish) = ".." then if Last > 1 then Start := Last - 1; while Start > 1 and then Path_Buffer (Start) /= Directory_Separator loop Start := Start - 1; end loop; else Start := Last; end if; if Start = 1 then if Finish = End_Path then return (1 => Directory_Separator); else Path_Buffer (1 .. End_Path - Finish) := Path_Buffer (Finish + 1 .. End_Path); End_Path := End_Path - Finish; Last := 1; end if; else if Finish = End_Path then return Final_Value (Path_Buffer (1 .. Start - 1)); else Path_Buffer (Start + 1 .. Start + End_Path - Finish - 1) := Path_Buffer (Finish + 2 .. End_Path); End_Path := Start + End_Path - Finish - 1; Last := Start; end if; end if; -- Check if current field is a symbolic link elsif Resolve_Links then declare Saved : constant Character := Path_Buffer (Finish + 1); begin Path_Buffer (Finish + 1) := ASCII.NUL; Status := Readlink (Path => Path_Buffer'Address, Buf => Link_Buffer'Address, Bufsiz => Link_Buffer'Length); Path_Buffer (Finish + 1) := Saved; end; -- Not a symbolic link, move to the next field, if any if Status <= 0 then Last := Finish + 1; -- Replace symbolic link with its value else if Is_Absolute_Path (Link_Buffer (1 .. Status)) then Path_Buffer (Status + 1 .. End_Path - (Finish - Status)) := Path_Buffer (Finish + 1 .. End_Path); End_Path := End_Path - (Finish - Status); Path_Buffer (1 .. Status) := Link_Buffer (1 .. Status); Last := 1; else Path_Buffer (Last + Status + 1 .. End_Path - Finish + Last + Status) := Path_Buffer (Finish + 1 .. End_Path); End_Path := End_Path - Finish + Last + Status; Path_Buffer (Last + 1 .. Last + Status) := Link_Buffer (1 .. Status); end if; end if; else Last := Finish + 1; end if; end loop; -- Too many iterations: give up -- This can happen when there is a circularity in the symbolic links: A -- is a symbolic link for B, which itself is a symbolic link, and the -- target of B or of another symbolic link target of B is A. In this -- case, we return an empty string to indicate failure to resolve. return ""; end Normalize_Pathname; ----------------- -- Open_Append -- ----------------- function Open_Append (Name : C_File_Name; Fmode : Mode) return File_Descriptor is function C_Open_Append (Name : C_File_Name; Fmode : Mode) return File_Descriptor; pragma Import (C, C_Open_Append, "__gnat_open_append"); begin return C_Open_Append (Name, Fmode); end Open_Append; function Open_Append (Name : String; Fmode : Mode) return File_Descriptor is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return Open_Append (C_Name (C_Name'First)'Address, Fmode); end Open_Append; --------------- -- Open_Read -- --------------- function Open_Read (Name : C_File_Name; Fmode : Mode) return File_Descriptor is function C_Open_Read (Name : C_File_Name; Fmode : Mode) return File_Descriptor; pragma Import (C, C_Open_Read, "__gnat_open_read"); begin return C_Open_Read (Name, Fmode); end Open_Read; function Open_Read (Name : String; Fmode : Mode) return File_Descriptor is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return Open_Read (C_Name (C_Name'First)'Address, Fmode); end Open_Read; --------------------- -- Open_Read_Write -- --------------------- function Open_Read_Write (Name : C_File_Name; Fmode : Mode) return File_Descriptor is function C_Open_Read_Write (Name : C_File_Name; Fmode : Mode) return File_Descriptor; pragma Import (C, C_Open_Read_Write, "__gnat_open_rw"); begin return C_Open_Read_Write (Name, Fmode); end Open_Read_Write; function Open_Read_Write (Name : String; Fmode : Mode) return File_Descriptor is C_Name : String (1 .. Name'Length + 1); begin C_Name (1 .. Name'Length) := Name; C_Name (C_Name'Last) := ASCII.NUL; return Open_Read_Write (C_Name (C_Name'First)'Address, Fmode); end Open_Read_Write; ------------- -- OS_Exit -- ------------- procedure OS_Exit (Status : Integer) is begin OS_Exit_Ptr (Status); raise Program_Error; end OS_Exit; --------------------- -- OS_Exit_Default -- --------------------- procedure OS_Exit_Default (Status : Integer) is procedure GNAT_OS_Exit (Status : Integer); pragma Import (C, GNAT_OS_Exit, "__gnat_os_exit"); pragma No_Return (GNAT_OS_Exit); begin GNAT_OS_Exit (Status); end OS_Exit_Default; -------------------- -- Pid_To_Integer -- -------------------- function Pid_To_Integer (Pid : Process_Id) return Integer is begin return Integer (Pid); end Pid_To_Integer; ---------- -- Read -- ---------- function Read (FD : File_Descriptor; A : System.Address; N : Integer) return Integer is begin return Integer (System.CRTL.read (System.CRTL.int (FD), System.CRTL.chars (A), System.CRTL.size_t (N))); end Read; ----------------- -- Rename_File -- ----------------- procedure Rename_File (Old_Name : C_File_Name; New_Name : C_File_Name; Success : out Boolean) is function rename (From, To : Address) return Integer; pragma Import (C, rename, "__gnat_rename"); R : Integer; begin R := rename (Old_Name, New_Name); Success := (R = 0); end Rename_File; procedure Rename_File (Old_Name : String; New_Name : String; Success : out Boolean) is C_Old_Name : String (1 .. Old_Name'Length + 1); C_New_Name : String (1 .. New_Name'Length + 1); begin C_Old_Name (1 .. Old_Name'Length) := Old_Name; C_Old_Name (C_Old_Name'Last) := ASCII.NUL; C_New_Name (1 .. New_Name'Length) := New_Name; C_New_Name (C_New_Name'Last) := ASCII.NUL; Rename_File (C_Old_Name'Address, C_New_Name'Address, Success); end Rename_File; ----------------------- -- Set_Close_On_Exec -- ----------------------- procedure Set_Close_On_Exec (FD : File_Descriptor; Close_On_Exec : Boolean; Status : out Boolean) is function C_Set_Close_On_Exec (FD : File_Descriptor; Close_On_Exec : System.CRTL.int) return System.CRTL.int; pragma Import (C, C_Set_Close_On_Exec, "__gnat_set_close_on_exec"); begin Status := C_Set_Close_On_Exec (FD, Boolean'Pos (Close_On_Exec)) = 0; end Set_Close_On_Exec; -------------------- -- Set_Executable -- -------------------- procedure Set_Executable (Name : String; Mode : Positive := S_Owner) is procedure C_Set_Executable (Name : C_File_Name; Mode : Integer); pragma Import (C, C_Set_Executable, "__gnat_set_executable"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_Executable (C_Name (C_Name'First)'Address, Mode); end Set_Executable; ------------------------------------- -- Set_File_Last_Modify_Time_Stamp -- ------------------------------------- procedure Set_File_Last_Modify_Time_Stamp (Name : String; Time : OS_Time) is procedure C_Set_File_Time (Name : C_File_Name; Time : OS_Time); pragma Import (C, C_Set_File_Time, "__gnat_set_file_time_name"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_File_Time (C_Name'Address, Time); end Set_File_Last_Modify_Time_Stamp; ---------------------- -- Set_Non_Readable -- ---------------------- procedure Set_Non_Readable (Name : String) is procedure C_Set_Non_Readable (Name : C_File_Name); pragma Import (C, C_Set_Non_Readable, "__gnat_set_non_readable"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_Non_Readable (C_Name (C_Name'First)'Address); end Set_Non_Readable; ---------------------- -- Set_Non_Writable -- ---------------------- procedure Set_Non_Writable (Name : String) is procedure C_Set_Non_Writable (Name : C_File_Name); pragma Import (C, C_Set_Non_Writable, "__gnat_set_non_writable"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_Non_Writable (C_Name (C_Name'First)'Address); end Set_Non_Writable; ------------------ -- Set_Readable -- ------------------ procedure Set_Readable (Name : String) is procedure C_Set_Readable (Name : C_File_Name); pragma Import (C, C_Set_Readable, "__gnat_set_readable"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_Readable (C_Name (C_Name'First)'Address); end Set_Readable; -------------------- -- Set_Writable -- -------------------- procedure Set_Writable (Name : String) is procedure C_Set_Writable (Name : C_File_Name); pragma Import (C, C_Set_Writable, "__gnat_set_writable"); C_Name : aliased String (Name'First .. Name'Last + 1); begin C_Name (Name'Range) := Name; C_Name (C_Name'Last) := ASCII.NUL; C_Set_Writable (C_Name (C_Name'First)'Address); end Set_Writable; ------------ -- Setenv -- ------------ procedure Setenv (Name : String; Value : String) is F_Name : String (1 .. Name'Length + 1); F_Value : String (1 .. Value'Length + 1); procedure Set_Env_Value (Name, Value : System.Address); pragma Import (C, Set_Env_Value, "__gnat_setenv"); begin F_Name (1 .. Name'Length) := Name; F_Name (F_Name'Last) := ASCII.NUL; F_Value (1 .. Value'Length) := Value; F_Value (F_Value'Last) := ASCII.NUL; Set_Env_Value (F_Name'Address, F_Value'Address); end Setenv; ----------- -- Spawn -- ----------- function Spawn (Program_Name : String; Args : Argument_List) return Integer is Junk : Process_Id; pragma Warnings (Off, Junk); Result : Integer; begin Spawn_Internal (Program_Name, Args, Result, Junk, Blocking => True); return Result; end Spawn; procedure Spawn (Program_Name : String; Args : Argument_List; Success : out Boolean) is begin Success := (Spawn (Program_Name, Args) = 0); end Spawn; procedure Spawn (Program_Name : String; Args : Argument_List; Output_File_Descriptor : File_Descriptor; Return_Code : out Integer; Err_To_Out : Boolean := True) is Saved_Error : File_Descriptor := Invalid_FD; -- prevent compiler warning Saved_Output : File_Descriptor; begin -- Set standard output and error to the temporary file Saved_Output := Dup (Standout); Dup2 (Output_File_Descriptor, Standout); if Err_To_Out then Saved_Error := Dup (Standerr); Dup2 (Output_File_Descriptor, Standerr); end if; -- Spawn the program Return_Code := Spawn (Program_Name, Args); -- Restore the standard output and error Dup2 (Saved_Output, Standout); if Err_To_Out then Dup2 (Saved_Error, Standerr); end if; -- And close the saved standard output and error file descriptors Close (Saved_Output); if Err_To_Out then Close (Saved_Error); end if; end Spawn; procedure Spawn (Program_Name : String; Args : Argument_List; Output_File : String; Success : out Boolean; Return_Code : out Integer; Err_To_Out : Boolean := True) is FD : File_Descriptor; begin Success := True; Return_Code := 0; FD := Create_Output_Text_File (Output_File); if FD = Invalid_FD then Success := False; return; end if; Spawn (Program_Name, Args, FD, Return_Code, Err_To_Out); Close (FD, Success); end Spawn; -------------------- -- Spawn_Internal -- -------------------- procedure Spawn_Internal (Program_Name : String; Args : Argument_List; Result : out Integer; Pid : out Process_Id; Blocking : Boolean) is procedure Spawn (Args : Argument_List); -- Call Spawn with given argument list N_Args : Argument_List (Args'Range); -- Normalized arguments ----------- -- Spawn -- ----------- procedure Spawn (Args : Argument_List) is type Chars is array (Positive range <>) of aliased Character; type Char_Ptr is access constant Character; Command_Len : constant Positive := Program_Name'Length + 1 + Args_Length (Args); Command_Last : Natural := 0; Command : aliased Chars (1 .. Command_Len); -- Command contains all characters of the Program_Name and Args, all -- terminated by ASCII.NUL characters. Arg_List_Len : constant Positive := Args'Length + 2; Arg_List_Last : Natural := 0; Arg_List : aliased array (1 .. Arg_List_Len) of Char_Ptr; -- List with pointers to NUL-terminated strings of the Program_Name -- and the Args and terminated with a null pointer. We rely on the -- default initialization for the last null pointer. procedure Add_To_Command (S : String); -- Add S and a NUL character to Command, updating Last function Portable_Spawn (Args : Address) return Integer; pragma Import (C, Portable_Spawn, "__gnat_portable_spawn"); function Portable_No_Block_Spawn (Args : Address) return Process_Id; pragma Import (C, Portable_No_Block_Spawn, "__gnat_portable_no_block_spawn"); -------------------- -- Add_To_Command -- -------------------- procedure Add_To_Command (S : String) is First : constant Natural := Command_Last + 1; begin Command_Last := Command_Last + S'Length; -- Move characters one at a time, because Command has aliased -- components. -- But not volatile, so why is this necessary ??? for J in S'Range loop Command (First + J - S'First) := S (J); end loop; Command_Last := Command_Last + 1; Command (Command_Last) := ASCII.NUL; Arg_List_Last := Arg_List_Last + 1; Arg_List (Arg_List_Last) := Command (First)'Access; end Add_To_Command; -- Start of processing for Spawn begin Add_To_Command (Program_Name); for J in Args'Range loop Add_To_Command (Args (J).all); end loop; if Blocking then Pid := Invalid_Pid; Result := Portable_Spawn (Arg_List'Address); else Pid := Portable_No_Block_Spawn (Arg_List'Address); Result := Boolean'Pos (Pid /= Invalid_Pid); end if; end Spawn; -- Start of processing for Spawn_Internal begin -- Copy arguments into a local structure for K in N_Args'Range loop N_Args (K) := new String'(Args (K).all); end loop; -- Normalize those arguments Normalize_Arguments (N_Args); -- Call spawn using the normalized arguments Spawn (N_Args); -- Free arguments list for K in N_Args'Range loop Free (N_Args (K)); end loop; end Spawn_Internal; ------------ -- To_Ada -- ------------ function To_Ada (Time : time_t) return OS_Time is begin return OS_Time (Time); end To_Ada; --------------------------- -- To_Path_String_Access -- --------------------------- function To_Path_String_Access (Path_Addr : Address; Path_Len : Integer) return String_Access is subtype Path_String is String (1 .. Path_Len); type Path_String_Access is access Path_String; function Address_To_Access is new Ada.Unchecked_Conversion (Source => Address, Target => Path_String_Access); Path_Access : constant Path_String_Access := Address_To_Access (Path_Addr); Return_Val : String_Access; begin Return_Val := new String (1 .. Path_Len); for J in 1 .. Path_Len loop Return_Val (J) := Path_Access (J); end loop; return Return_Val; end To_Path_String_Access; ---------- -- To_C -- ---------- function To_C (Time : OS_Time) return time_t is begin return time_t (Time); end To_C; ------------------ -- Wait_Process -- ------------------ procedure Wait_Process (Pid : out Process_Id; Success : out Boolean) is Status : Integer; function Portable_Wait (S : Address) return Process_Id; pragma Import (C, Portable_Wait, "__gnat_portable_wait"); begin Pid := Portable_Wait (Status'Address); Success := (Status = 0); end Wait_Process; ----------- -- Write -- ----------- function Write (FD : File_Descriptor; A : System.Address; N : Integer) return Integer is begin return Integer (System.CRTL.write (System.CRTL.int (FD), System.CRTL.chars (A), System.CRTL.size_t (N))); end Write; end System.OS_Lib;
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ------------------------------------------------------------- package body Program.Nodes.Procedure_Access_Types is function Create (Not_Token : Program.Lexical_Elements.Lexical_Element_Access; Null_Token : Program.Lexical_Elements.Lexical_Element_Access; Access_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Protected_Token : Program.Lexical_Elements.Lexical_Element_Access; Procedure_Token : not null Program.Lexical_Elements .Lexical_Element_Access; Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access; Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access) return Procedure_Access_Type is begin return Result : Procedure_Access_Type := (Not_Token => Not_Token, Null_Token => Null_Token, Access_Token => Access_Token, Protected_Token => Protected_Token, Procedure_Token => Procedure_Token, Left_Bracket_Token => Left_Bracket_Token, Parameters => Parameters, Right_Bracket_Token => Right_Bracket_Token, Enclosing_Element => null) do Initialize (Result); end return; end Create; function Create (Parameters : Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access; Is_Part_Of_Implicit : Boolean := False; Is_Part_Of_Inherited : Boolean := False; Is_Part_Of_Instance : Boolean := False; Has_Not_Null : Boolean := False; Has_Protected : Boolean := False) return Implicit_Procedure_Access_Type is begin return Result : Implicit_Procedure_Access_Type := (Parameters => Parameters, Is_Part_Of_Implicit => Is_Part_Of_Implicit, Is_Part_Of_Inherited => Is_Part_Of_Inherited, Is_Part_Of_Instance => Is_Part_Of_Instance, Has_Not_Null => Has_Not_Null, Has_Protected => Has_Protected, Enclosing_Element => null) do Initialize (Result); end return; end Create; overriding function Parameters (Self : Base_Procedure_Access_Type) return Program.Elements.Parameter_Specifications .Parameter_Specification_Vector_Access is begin return Self.Parameters; end Parameters; overriding function Not_Token (Self : Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Not_Token; end Not_Token; overriding function Null_Token (Self : Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Null_Token; end Null_Token; overriding function Access_Token (Self : Procedure_Access_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Access_Token; end Access_Token; overriding function Protected_Token (Self : Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Protected_Token; end Protected_Token; overriding function Procedure_Token (Self : Procedure_Access_Type) return not null Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Procedure_Token; end Procedure_Token; overriding function Left_Bracket_Token (Self : Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Left_Bracket_Token; end Left_Bracket_Token; overriding function Right_Bracket_Token (Self : Procedure_Access_Type) return Program.Lexical_Elements.Lexical_Element_Access is begin return Self.Right_Bracket_Token; end Right_Bracket_Token; overriding function Has_Not_Null (Self : Procedure_Access_Type) return Boolean is begin return Self.Null_Token.Assigned; end Has_Not_Null; overriding function Has_Protected (Self : Procedure_Access_Type) return Boolean is begin return Self.Protected_Token.Assigned; end Has_Protected; overriding function Is_Part_Of_Implicit (Self : Implicit_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Implicit; end Is_Part_Of_Implicit; overriding function Is_Part_Of_Inherited (Self : Implicit_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Inherited; end Is_Part_Of_Inherited; overriding function Is_Part_Of_Instance (Self : Implicit_Procedure_Access_Type) return Boolean is begin return Self.Is_Part_Of_Instance; end Is_Part_Of_Instance; overriding function Has_Not_Null (Self : Implicit_Procedure_Access_Type) return Boolean is begin return Self.Has_Not_Null; end Has_Not_Null; overriding function Has_Protected (Self : Implicit_Procedure_Access_Type) return Boolean is begin return Self.Has_Protected; end Has_Protected; procedure Initialize (Self : in out Base_Procedure_Access_Type'Class) is begin for Item in Self.Parameters.Each_Element loop Set_Enclosing_Element (Item.Element, Self'Unchecked_Access); end loop; null; end Initialize; overriding function Is_Procedure_Access_Type (Self : Base_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Procedure_Access_Type; overriding function Is_Access_Type (Self : Base_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Access_Type; overriding function Is_Type_Definition (Self : Base_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Type_Definition; overriding function Is_Definition (Self : Base_Procedure_Access_Type) return Boolean is pragma Unreferenced (Self); begin return True; end Is_Definition; overriding procedure Visit (Self : not null access Base_Procedure_Access_Type; Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is begin Visitor.Procedure_Access_Type (Self); end Visit; overriding function To_Procedure_Access_Type_Text (Self : in out Procedure_Access_Type) return Program.Elements.Procedure_Access_Types .Procedure_Access_Type_Text_Access is begin return Self'Unchecked_Access; end To_Procedure_Access_Type_Text; overriding function To_Procedure_Access_Type_Text (Self : in out Implicit_Procedure_Access_Type) return Program.Elements.Procedure_Access_Types .Procedure_Access_Type_Text_Access is pragma Unreferenced (Self); begin return null; end To_Procedure_Access_Type_Text; end Program.Nodes.Procedure_Access_Types;
--------------------------------------------------------------------------------- -- package body Banded_LU, LU decomposition, equation solving for banded matrices -- Copyright (C) 1995-2018 Jonathan S. Parker -- -- 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. --------------------------------------------------------------------------------- with Text_IO; package body Banded_LU is ------------- -- Product -- ------------- -- Matrix Vector multiplication function Product (A : in Banded_Matrix; X : in Column; Final_Index : in Index := Index'Last; Starting_Index : in Index := Index'First) return Column is Result : Column := (others => Zero); Sum : Real; Col_First, Col_Last : Integer; begin for Row in Starting_Index .. Final_Index loop Sum := Zero; Col_First := Integer'Max (Row - No_Of_Off_Diagonals, Starting_Index); Col_Last := Integer'Min (Row + No_Of_Off_Diagonals, Final_Index); for Col in Col_First .. Col_Last loop Sum := Sum + A (Row)(Col - Row) * X (Col); end loop; Result(Row) := Sum; end loop; return Result; end Product; --------------------- -- Refine_Solution -- --------------------- -- if No_Of_Iterations=0 then usual solution is returned. -- if No_Of_Iterations=1 then solution is refined iteratively once. -- -- Not necessarily much use if error is due to ill-conditioning of Matrix A. -- -- Iterative refinement of the solution returned by LU_decompose() and -- Solve(). Uses the Newton-like iteration for the solution of A*X = b, -- -- X_{k+1} = X_k + A_Inverse_Approximate * (b - A*X_k). -- -- Here A_Inverse_Approximate (we will call it V below) represents the -- solution returned by LU_decompose() followed by Solve(). -- -- if y = exact error in 1st iteration: y = X_inf - X_1, then y is the -- exact solution of A*y = d_1 where d_1 = b - A*X_1. -- Let V denote approximate inverse of A. Iterate for y using -- -- Delta_Y_{k+1} == Y_{k+1} - Y_k = V*(d_1 - A*Y_k). -- -- Remember Y = exact error in 1st iteration = SUM (Delta_Y_k's). -- Here's the actual method: -- -- Let d_1 = b - A*X_1 (the standard Residual: 1st estimate of error in A*X = b) -- Delta_Y_1 = V*d_1 -- Let d_2 = d_1 - A*Delta_Y_1 -- Delta_Y_2 = V*(d_1 - A*Delta_Y_1) = V*d_2 -- Let d_3 = d_2 - A*Delta_Y_2 -- Delta_Y_3 = V*(d_1 - A*Delta_Y_1 - A*Delta_Y_2) = V*d_3 -- -- so: d_k = d_{k-1} - A*Delta_Y_{k-1}; Delta_Y_k = V*d_k -- -- Sum the Delta_Y_k's to get the correction to X_1: Y = SUM (Delta_Y_k's). -- procedure Refine_Solution (X : out Column; B : in Column; A_LU : in Banded_Matrix; Diag_Inverse : in Column; A : in Banded_Matrix; No_Of_Iterations : in Natural := 1; Final_Index : in Index := Index'Last; Starting_Index : in Index := Index'First) is Delta_Y, X_1, A_Y : Column := (others => 0.0); D_k : Column := (others => 0.0); Y_f : Column := (others => 0.0); begin -- Get X_1 as defined above. Solve (X_1, B, A_LU, Diag_Inverse, Final_Index, Starting_Index); if No_Of_Iterations > 0 then A_Y := Product(A, X_1, Final_Index, Starting_Index); -- D_1: for I in Starting_Index .. Final_Index loop D_k(I) := B(I) - A_Y(I); end loop; Solve (Delta_Y, D_k, A_LU, Diag_Inverse, Final_Index, Starting_Index); -- Y_f is Sum of all the iterated Delta_Y's. Initialize it: Y_f := Delta_Y; for Iteration in 1..No_Of_Iterations-1 loop -- get d_k = d_k - A*Delta_Y_k A_Y := Product (A, Delta_Y, Final_Index, Starting_Index); for I in Starting_Index .. Final_Index loop D_k(I) := D_k(I) - A_Y(I); end loop; -- get Delta_Y = V*D_k: Solve (Delta_Y, D_k, A_LU, Diag_Inverse, Final_Index, Starting_Index); -- Accumulate Y_f: the full correction to X_1: for I in Starting_Index .. Final_Index loop Y_f(I) := Y_f(I) + Delta_Y(I); end loop; end loop; end if; for I in Starting_Index..Final_Index loop X(I) := Y_f(I) + X_1(I); end loop; end Refine_Solution; ---------------- -- Matrix_Val -- ---------------- -- Translates (Row, Col) to (I, Diagonal_id) using -- the formula I = Row, and Diagonal_id = Col - Row. -- -- Banded Matrices are by definition 0 everywhere except on the -- diagonal bands. So 0 is returned if (Row, Col) is not in the -- banded region. function Matrix_Val (A : Banded_Matrix; Row : Index; Col : Index) return Real is Diag_ID : constant Integer := (Col - Row); Result : Real; begin if Abs Diag_ID > No_Of_Off_Diagonals then Result := 0.0; else Result := A(Row)(Diag_ID); end if; return Result; end; ------------------ -- LU_Decompose -- ------------------ -- Translates from (Row, Col) indices to (I, Diagonal) -- with the formula I = Row, and Diagonal = Col - Row. procedure LU_Decompose (A : in out Banded_Matrix; Diag_Inverse : out Column; Final_Index : in Index := Index'Last; Starting_Index : in Index := Index'First) is Stage : Index; Sum : Real; Col_First, Row_Last : Integer; Min_Allowed_Pivot_Ratio, Min_Allowed_Pivot_Val : Real; Reciprocal_Pivot_Val, Pivot_Val, Abs_Pivot_Val : Real; Max_Pivot_Val : Real := Min_Allowed_Real; Min_Pivot_Ratio : constant Real := 2.0**(-Real'Machine_Mantissa) * 1.0E-3; begin Diag_Inverse := (Others => 0.0); if Final_Index - Starting_Index + 1 < No_Of_Off_Diagonals + 1 then text_io.put ("Matrix Size must be >= No_Of_Off_Diagonals+1."); raise Constraint_Error; end if; Min_Allowed_Pivot_Ratio := Min_Pivot_Ratio; -- Step 0. 1 X 1 matrices: They can't exist because of above. -- Step 1. The outer loop. -- At each stage we calculate row "stage" of the Upper matrix U -- and Column "Stage" of the Lower matrix L. -- The matrix A is overwritten with these, because the elements -- of A in those places are never needed in future stages. -- However, the elements of L ARE needed in those places, -- so to get those elements we will be accessing A (which stores them). for Stage in Starting_Index..Final_Index-1 loop Row_Last := Integer'Min (Stage + No_Of_Off_Diagonals, Final_Index); if Stage > Starting_Index then for J in Stage .. Row_Last loop Sum := 0.0; --for K in Starting_Index .. Stage-1 loop -- --Sum := Sum + L(J)(K)*U(K)(Stage); -- Sum := Sum + A(J)(K)*A(K)(Stage); --end loop; Col_First := Integer'Max (J - No_Of_Off_Diagonals, Starting_Index); for K in Col_First..Stage-1 loop Sum := Sum + A(J)(K-J)*A(K)(Stage-K); end loop; --L(J)(Stage) := L(J)(Stage) - Sum; --L(J)(Stage-J) := L(J)(Stage-J) - Sum; A(J)(Stage-J) := A(J)(Stage-J) - Sum; end loop; end if; -- Step 2: Get row "stage" of U and -- column "stage" of L. Notice these formulas update -- only (Stage+1..Last) elements of the respective row -- and column, and depend on only (1..Stage) elements -- of U and L, which were calculated previously, and stored in A. Pivot_Val := A(Stage)(0); Abs_Pivot_Val := Abs (Pivot_Val); if Abs_Pivot_Val > Max_Pivot_Val then Max_Pivot_Val := Abs_Pivot_Val; end if; Min_Allowed_Pivot_Val := Max_Pivot_Val*Min_Allowed_Pivot_Ratio + Min_Allowed_Real; if (Abs_Pivot_Val < Min_Allowed_Pivot_Val) then Min_Allowed_Pivot_Val := Real'Copy_Sign (Min_Allowed_Pivot_Val, Pivot_Val); Reciprocal_Pivot_Val := 1.0 / Min_Allowed_Pivot_Val; else Reciprocal_Pivot_Val := 1.0 / Pivot_Val; end if; if (Abs_Pivot_Val < Min_Allowed_Real) then Reciprocal_Pivot_Val := 0.0; end if; Diag_Inverse(Stage) := Reciprocal_Pivot_Val; for J in Stage+1..Row_Last loop Sum := 0.0; if Stage > Starting_Index then --for K in Starting_Index .. Stage-1 loop -- --Sum := Sum + L(Stage)(K)*U(K)(J); -- Sum := Sum + A(Stage)(K)*A(K)(J); --end loop; Col_First := Integer'Max (Starting_Index, J - No_Of_Off_Diagonals); for K in Col_First..Stage-1 loop Sum := Sum + A(Stage)(K-Stage) * A(K)(J-K); end loop; end if; --U(Stage)(J) := (A(Stage)(J) - Sum) * Scale_Factor; A(Stage)(J-Stage) := (A(Stage)(J-Stage) - Sum) * Reciprocal_Pivot_Val; end loop; end loop; -- Step 3: Get final row and column. Stage := Final_Index; Sum := 0.0; --for K in Starting_Index .. Stage-1 loop -- --Sum := Sum + L(Stage)(K)*U(K)(Stage); -- Sum := Sum + A(Stage)(K)*A(K)(Stage); --end loop; Col_First := Integer'Max(Starting_Index, Integer(Stage)-No_Of_Off_Diagonals); for K in Col_First..Stage-1 loop Sum := Sum + A(Stage)(K-Stage)*A(K)(Stage-K); end loop; A(Stage)(0) := A(Stage)(0) - Sum; Pivot_Val := A(Stage)(0); Abs_Pivot_Val := Abs (Pivot_Val); if Abs_Pivot_Val > Max_Pivot_Val then Max_Pivot_Val := Abs_Pivot_Val; end if; Min_Allowed_Pivot_Val := Max_Pivot_Val*Min_Allowed_Pivot_Ratio + Min_Allowed_Real; if Abs_Pivot_Val < Min_Allowed_Pivot_Val then Min_Allowed_Pivot_Val := Real'Copy_Sign (Min_Allowed_Pivot_Val, Pivot_Val); Reciprocal_Pivot_Val := 1.0 / Min_Allowed_Pivot_Val; else Reciprocal_Pivot_Val := 1.0 / Pivot_Val; end if; if Abs_Pivot_Val < Min_Allowed_Real then Reciprocal_Pivot_Val := 0.0; end if; Diag_Inverse(Stage) := Reciprocal_Pivot_Val; end LU_Decompose; ----------- -- Solve -- ----------- procedure Solve (X : out Column; B : in Column; A_LU : in Banded_Matrix; Diag_Inverse : in Column; Final_Index : in Index := Index'Last; Starting_Index : in Index := Index'First) is Z : Column; ID_of_1st_non_0 : Index := Starting_Index; Sum : Real; Col_First : Index; Col_Last : Index; begin for Row in Index loop X(Row) := 0.0; end loop; -- An optimization to make matrix inversion efficient. -- in Banded_Matrix inversion, the input vector B is -- is a unit vector: it is all zeros except for a 1.0. Need to -- to find 1st non-zero element of B: for I in Starting_Index..Final_Index loop if Abs (B(I)) > 0.0 then ID_of_1st_non_0 := I; exit; end if; end loop; -- In solving for Z in the equation L Z = B, the Z's will -- all be zero up to the 1st non-zero element of B. if ID_of_1st_non_0 > Index'First then for I in Starting_Index..ID_of_1st_non_0-1 loop Z(I) := 0.0; end loop; end if; -- The matrix equation is in the form L * U * X = B. -- First assume U * X is Z, and -- solve for Z in the equation L Z = B. Z(ID_of_1st_non_0) := B(ID_of_1st_non_0) * Diag_Inverse(ID_of_1st_non_0); if ID_of_1st_non_0 < Final_Index then for Row in ID_of_1st_non_0+1..Final_Index loop Sum := 0.0; Col_First := Integer'Max (Starting_Index, Row - No_Of_Off_Diagonals); for Col in Col_First .. Row-1 loop Sum := Sum + A_LU(Row)(Col-Row) * Z(Col); end loop; Z(Row) := (B(Row) - Sum) * Diag_Inverse(Row); end loop; end if; -- Solve for X in the equation U X = Z. X(Final_Index) := Z(Final_Index); if Final_Index > Starting_Index then for Row in reverse Starting_Index..Final_Index-1 loop Sum := 0.0; Col_Last := Integer'Min (Final_Index, Row + No_Of_Off_Diagonals); for Col in Row+1 .. Col_Last loop Sum := Sum + A_LU(Row)(Col-Row) * X(Col); end loop; X(Row) := (Z(Row) - Sum); end loop; end if; end Solve; end Banded_LU;
with openGL.Palette, openGL.Geometry.lit_colored_textured, openGL.Texture, openGL.IO, openGL.Primitive.indexed; package body openGL.Model.sphere.lit_colored_textured is --------- --- Forge -- function new_Sphere (Radius : in Real; lat_Count : in Positive := default_latitude_Count; long_Count : in Positive := default_longitude_Count; Image : in asset_Name := null_Asset) return View is Self : constant View := new Item; begin Self.define (Radius); Self.lat_Count := lat_Count; Self.long_Count := long_Count; Self.Image := Image; return Self; end new_Sphere; -------------- --- Attributes -- type Geometry_view is access all Geometry.lit_colored_textured.item'Class; -- NB: - An extra vertex is required at the end of each latitude ring. -- - This last vertex has the same site as the rings initial vertex. -- - The last vertex has 's' texture coord of 1.0, whereas -- the initial vertex has 's' texture coord of 0.0. -- overriding function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class; Fonts : in Font.font_id_Map_of_font) return Geometry.views is pragma unreferenced (Textures, Fonts); use openGL.Geometry, openGL.Palette, openGL.Geometry.lit_colored_textured; lat_Count : Positive renames Self.lat_Count; long_Count : Positive renames Self.long_Count; Num_lat_strips : constant Positive := lat_Count - 1; lat_Spacing : constant Real := Degrees_180 / Real (lat_Count - 1); long_Spacing : constant Real := Degrees_360 / Real (long_Count); vertex_Count : constant Index_t := 1 + 1 -- North and south pole. + Index_t ((long_Count + 1) * (lat_Count - 2)); -- Each latitude ring. indices_Count : constant long_Index_t := long_Index_t (Num_lat_strips * (long_Count + 1) * 2); the_Vertices : aliased Geometry.lit_colored_textured.Vertex_array := (1 .. vertex_Count => <>); the_Indices : aliased Indices := (1 .. indices_Count => <>); the_Sites : aliased Sites := (1 .. vertex_Count => <>); the_Geometry : constant Geometry_view := Geometry.lit_colored_textured.new_Geometry (texture_is_Alpha => False); begin set_Sites: declare use linear_Algebra, linear_Algebra_3d; north_Pole : constant Site := (0.0, 0.5, 0.0); south_Pole : constant Site := (0.0, -0.5, 0.0); the_Site : Site := north_Pole; vert_Id : Index_t := 1; -- Start at '1' (not '0')to account for north pole. a, b : Real := 0.0; -- Angular 'cursors' used to track lat/long for texture coords. latitude_line_First : Site; begin the_Sites (the_Vertices'First) := north_Pole; the_Vertices (the_Vertices'First).Site := north_Pole; the_Vertices (the_Vertices'First).Normal := Normalised (north_Pole); the_Vertices (the_Vertices'First).Shine := 0.5; the_Vertices (the_Vertices'First).Coords := (S => 0.5, T => 1.0); the_Vertices (the_Vertices'First).Color := (Primary => +White, Alpha => opaque_Value); the_Sites (the_Vertices'Last) := south_Pole; the_Vertices (the_Vertices'Last).Site := south_Pole; the_Vertices (the_Vertices'Last).Normal := Normalised (south_Pole); the_Vertices (the_Vertices'Last).Shine := 0.5; the_Vertices (the_Vertices'Last).Coords := (S => 0.5, T => 0.0); the_Vertices (the_Vertices'Last).Color := (Primary => +White, Alpha => opaque_Value); for lat_Id in 2 .. lat_Count - 1 loop a := 0.0; b := b + lat_Spacing; the_Site := the_Site * z_Rotation_from (lat_Spacing); latitude_line_First := the_Site; -- Store initial latitude lines 1st point. vert_Id := vert_Id + 1; the_Sites (vert_Id) := the_Site; -- Add 1st point on a line of latitude. the_Vertices (vert_Id).Site := the_Site; the_Vertices (vert_Id).Normal := Normalised (the_Site); the_Vertices (vert_Id).Shine := 0.5; the_Vertices (vert_Id).Color := (Primary => +White, Alpha => opaque_Value); the_Vertices (vert_Id).Coords := (S => a / Degrees_360, T => 1.0 - b / Degrees_180); for long_Id in 1 .. long_Count loop a := a + long_Spacing; if long_Id /= long_Count then the_Site := the_Site * y_Rotation_from (-long_Spacing); else the_Site := latitude_line_First; -- Restore the_Vertex back to initial latitude lines 1st point. end if; vert_Id := vert_Id + 1; the_Sites (vert_Id) := the_Site; -- Add each succesive point on a line of latitude. the_Vertices (vert_Id).Site := the_Site; the_Vertices (vert_Id).Normal := Normalised (the_Site); the_Vertices (vert_Id).Shine := 0.5; the_Vertices (vert_Id).Color := (Primary => +White, Alpha => opaque_Value); the_Vertices (vert_Id).Coords := (S => a / Degrees_360, T => 1.0 - b / Degrees_180); end loop; end loop; end set_Sites; for i in the_Vertices'Range loop the_Vertices (i).Site := the_Vertices (i).Site * Self.Radius * 2.0; end loop; set_Indices: declare strip_Id : long_Index_t := 0; Upper : Index_t; Lower : Index_t; begin Upper := 1; Lower := 2; for lat_Strip in 1 .. num_lat_Strips loop for Each in 1 .. long_Count + 1 loop strip_Id := strip_Id + 1; the_Indices (strip_Id) := Upper; strip_Id := strip_Id + 1; the_Indices (strip_Id) := Lower; if lat_Strip /= 1 then Upper := Upper + 1; end if; if lat_Strip /= num_lat_Strips then Lower := Lower + 1; end if; end loop; if lat_Strip = 1 then Upper := 2; end if; Lower := Upper + Index_t (long_Count) + 1; end loop; end set_Indices; if Self.Image /= null_Asset -- TODO: Use 'Textures' (ie name_Map_of_texture) here and in other models. then set_Texture: declare use Texture; the_Image : constant Image := IO.to_Image (Self.Image); the_Texture : constant Texture.object := Forge.to_Texture ( the_Image); begin the_Geometry.Texture_is (the_Texture); end set_Texture; end if; the_Geometry.is_Transparent (False); the_Geometry.Vertices_are (the_Vertices); declare the_Primitive : constant Primitive.indexed.view := Primitive.indexed.new_Primitive (Primitive.triangle_Strip, the_Indices); begin the_Geometry.add (Primitive.view (the_Primitive)); end; return (1 => Geometry.view (the_Geometry)); end to_GL_Geometries; end openGL.Model.sphere.lit_colored_textured;
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding -- -- -- -- Terminal_Interface.Curses.Forms.Field_Types.Numeric -- -- -- -- 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 <Juergen.Pfeifer@T-Online.de> 1996 -- Version Control: -- $Revision: 1.5 $ -- Binding Version 00.93 ------------------------------------------------------------------------------ package Terminal_Interface.Curses.Forms.Field_Types.Numeric is pragma Preelaborate (Numeric); type Numeric_Field is new Field_Type with record Precision : Natural; Lower_Limit : Float; Upper_Limit : Float; end record; procedure Set_Field_Type (Fld : in Field; Typ : in Numeric_Field); pragma Inline (Set_Field_Type); end Terminal_Interface.Curses.Forms.Field_Types.Numeric;
------------------------------------------------------------------------------ -- -- -- Ada User Repository Annex (AURA) -- -- ANNEXI-STRAYLINE Reference Implementation -- -- -- -- Command Line Interface -- -- -- -- ------------------------------------------------------------------------ -- -- -- -- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. -- -- All rights reserved. -- -- -- -- Original Contributors: -- -- * Richard Wai (ANNEXI-STRAYLINE) -- -- -- -- 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 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 -- -- OWNER 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 package centralizes specialized legality checks of various kinds with Progress; package Validation is procedure Validate_Subsystem_Dependencies; Validate_Subsystem_Dependencies_Progress: aliased Progress.Progress_Tracker; -- Scans all Available Subsystems for those who's repository is of the -- "System" format. If such subsystems are found, their forward dependent -- subsystems must be from the same repository. Each Subsystem that fails -- this check generates a failed item in the tracker, as well as an -- worker error report. -- -- This is a sequential action executed by a single work order so that -- progress can be monitored and queries serviced. end Validation;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_grab_server_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; end record; -- Item_Array -- type Item_Array is array (Interfaces.C.size_t range <>) of aliased xcb.xcb_grab_server_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_grab_server_request_t.Item, Element_Array => xcb.xcb_grab_server_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_grab_server_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_grab_server_request_t.Pointer, Element_Array => xcb.xcb_grab_server_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_grab_server_request_t;
-- Copyright 2012-2021 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 Full : Full_Table := (False, True, False, True, False); Primary : Primary_Table := (False, True, False); Cold : Cold_Table := (False, True); Small : Small_Table := New_Small_Table (Low => Red, High => Green); Multi : Multi_Table := New_Multi_Table (Red, Green, Low, Medium); Multi_Multi : Multi_Multi_Table := New_Multi_Multi_Table (1, 2, 1, 7, 1, 10); Multi_Access : Multi_Dimension_Access := new Multi_Dimension'(True => (1, 1, 2, 3, 5), False => (8, 13, 21, 34, 55)); Confused_Array : Confused_Array_Type := (Red => (0, 1, 2), Green => (5, 6, 7), others => (others => 72)); begin Do_Nothing (Full'Address); -- STOP Do_Nothing (Primary'Address); Do_Nothing (Cold'Address); Do_Nothing (Small'Address); Do_Nothing (Multi'Address); Do_Nothing (Multi_Multi'Address); Do_Nothing (Multi_Access'Address); end Foo;
with ada.text_io; use ada.text_io; procedure euler5 is i : long_long_integer; n : long_long_integer := 20; begin i := 19; while i >= 2 loop if n mod i /= 0 then n := n + 20; i := 20; end if; i := i - 1; end loop; put_line(long_long_integer'image(n)); end;
----------------------------------------------------------------------- -- util-encoders-hmac -- Hashed message authentication code -- Copyright (C) 2011 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. ----------------------------------------------------------------------- package Util.Encoders.HMAC is pragma Preelaborate; end Util.Encoders.HMAC;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M -- -- -- -- S p e c -- -- (VxWorks Version Mips) -- -- -- -- Copyright (C) 1992-2005 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 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. -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ package System is pragma Pure; -- Note that we take advantage of the implementation permission to make -- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada -- 2005, this is Pure in any case (AI-362). type Name is (SYSTEM_NAME_GNAT); System_Name : constant Name := SYSTEM_NAME_GNAT; -- System-Dependent Named Numbers Min_Int : constant := Long_Long_Integer'First; Max_Int : constant := Long_Long_Integer'Last; Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size; Max_Nonbinary_Modulus : constant := Integer'Last; Max_Base_Digits : constant := Long_Long_Float'Digits; Max_Digits : constant := Long_Long_Float'Digits; Max_Mantissa : constant := 63; Fine_Delta : constant := 2.0 ** (-Max_Mantissa); Tick : constant := 1.0 / 60.0; -- Storage-related Declarations type Address is private; Null_Address : constant Address; Storage_Unit : constant := 8; Word_Size : constant := 32; Memory_Size : constant := 2 ** 32; -- Address comparison function "<" (Left, Right : Address) return Boolean; function "<=" (Left, Right : Address) return Boolean; function ">" (Left, Right : Address) return Boolean; function ">=" (Left, Right : Address) return Boolean; function "=" (Left, Right : Address) return Boolean; pragma Import (Intrinsic, "<"); pragma Import (Intrinsic, "<="); pragma Import (Intrinsic, ">"); pragma Import (Intrinsic, ">="); pragma Import (Intrinsic, "="); -- Other System-Dependent Declarations type Bit_Order is (High_Order_First, Low_Order_First); Default_Bit_Order : constant Bit_Order := High_Order_First; -- Priority-related Declarations (RM D.1) -- 256 is reserved for the VxWorks kernel -- 248 - 255 correspond to hardware interrupt levels 0 .. 7 -- 247 is a catchall default "interrupt" priority for signals, -- allowing higher priority than normal tasks, but lower than -- hardware priority levels. Protected Object ceilings can -- override these values. -- 246 is used by the Interrupt_Manager task Max_Priority : constant Positive := 245; Max_Interrupt_Priority : constant Positive := 255; subtype Any_Priority is Integer range 0 .. 255; subtype Priority is Any_Priority range 0 .. 245; subtype Interrupt_Priority is Any_Priority range 246 .. 255; Default_Priority : constant Priority := 122; private type Address is mod Memory_Size; Null_Address : constant Address := 0; -------------------------------------- -- System Implementation Parameters -- -------------------------------------- -- These parameters provide information about the target that is used -- by the compiler. They are in the private part of System, where they -- can be accessed using the special circuitry in the Targparm unit -- whose source should be consulted for more detailed descriptions -- of the individual switch values. AAMP : constant Boolean := False; Backend_Divide_Checks : constant Boolean := False; Backend_Overflow_Checks : constant Boolean := False; Command_Line_Args : constant Boolean := False; Compiler_System_Version : constant Boolean := False; Configurable_Run_Time : constant Boolean := False; Denorm : constant Boolean := False; Duration_32_Bits : constant Boolean := False; Exit_Status_Supported : constant Boolean := True; Fractional_Fixed_Ops : constant Boolean := False; Frontend_Layout : constant Boolean := False; Functions_Return_By_DSP : constant Boolean := False; Machine_Overflows : constant Boolean := False; Machine_Rounds : constant Boolean := True; OpenVMS : constant Boolean := False; Preallocated_Stacks : constant Boolean := False; Signed_Zeros : constant Boolean := True; Stack_Check_Default : constant Boolean := False; Stack_Check_Probes : constant Boolean := False; Support_64_Bit_Divides : constant Boolean := True; Support_Aggregates : constant Boolean := True; Support_Composite_Assign : constant Boolean := True; Support_Composite_Compare : constant Boolean := True; Support_Long_Shifts : constant Boolean := True; Suppress_Standard_Library : constant Boolean := False; Use_Ada_Main_Program_Name : constant Boolean := True; ZCX_By_Default : constant Boolean := False; GCC_ZCX_Support : constant Boolean := False; Front_End_ZCX_Support : constant Boolean := False; -- Obsolete entries, to be removed eventually (bootstrap issues!) High_Integrity_Mode : constant Boolean := False; Long_Shifts_Inlined : constant Boolean := False; end System;
-- Copyright 2015 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/>. generic type Index_Base_T is range <>; type Component_T is private; package Array_List_G is subtype Length_T is Index_Base_T range 0 .. Index_Base_T'Last; subtype Index_T is Length_T range 1 .. Length_T'Last; type T is array (Index_T range <>) of Component_T; pragma Pack(T); end Array_List_G;
(1..N => V)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="11"> <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>duc_imf3</name> <ret_bitwidth>18</ret_bitwidth> <ports class_id="2" tracking_level="0" version="0"> <count>1</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>x</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>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <direction>0</direction> <if_type>0</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> </ports> <nodes class_id="8" tracking_level="0" version="0"> <count>60</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_2"> <Value> <Obj> <type>0</type> <id>10</id> <name>x_read</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>78</item> <item>79</item> </oprand_edges> <opcode>read</opcode> </item> <item class_id_reference="9" object_id="_3"> <Value> <Obj> <type>0</type> <id>11</id> <name>i_3_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>25</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</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>imf3.c</first> <second>imf3</second> </first> <second>25</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>80</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>12</id> <name>tmp</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>25</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>25</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>81</item> <item>83</item> </oprand_edges> <opcode>icmp</opcode> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>13</id> <name>in_3_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>84</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>14</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>25</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>25</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>85</item> <item>86</item> <item>87</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>16</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>26</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>26</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>88</item> <item>89</item> <item>230</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>17</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>27</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>27</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>90</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>19</id> <name>d_assign</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName>d</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>91</item> <item>92</item> <item>93</item> <item>94</item> </oprand_edges> <opcode>phi</opcode> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>20</id> <name>inc</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>28</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>28</second> </item> </second> </item> </inlineStackInfo> <originalName>inc</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>95</item> <item>97</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>21</id> <name>p_Val2_s</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>30</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>30</second> </item> </second> </item> </inlineStackInfo> <originalName>__Val2__</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>98</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>22</id> <name>ch_4</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>30</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>30</second> </item> </second> </item> </inlineStackInfo> <originalName>ch</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>100</item> <item>101</item> <item>103</item> </oprand_edges> <opcode>bitselect</opcode> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>23</id> <name>tmp_s</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</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>104</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>24</id> <name>c_3_0_addr</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>105</item> <item>107</item> <item>108</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>25</id> <name>c_3_0_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>109</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>26</id> <name>init_3_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>110</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>27</id> <name>tmp_9</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</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>111</item> <item>113</item> </oprand_edges> <opcode>icmp</opcode> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>28</id> <name>or_cond</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</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>114</item> <item>115</item> </oprand_edges> <opcode>or</opcode> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>29</id> <name>tmp_10</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>28</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>28</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>117</item> <item>118</item> <item>119</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>30</id> <name>tmp_11</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</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>120</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>31</id> <name>shift_reg_p0_addr</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>121</item> <item>122</item> <item>123</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>32</id> <name>shift_reg_p0_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>124</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>33</id> <name>tmp_3</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>125</item> <item>127</item> <item>128</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_i</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>36</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>129</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>35</id> <name>tmp_i_14</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>36</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>130</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>36</id> <name>tmp_i_cast</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>35</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>131</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>37</id> <name>m</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName>m</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>36</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>132</item> <item>133</item> </oprand_edges> <opcode>mul</opcode> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>38</id> <name>tmp_59_i</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>134</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>39</id> <name>acc0</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>32</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>32</second> </item> </second> </item> </inlineStackInfo> <originalName>acc0</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>135</item> <item>136</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>40</id> <name>c_3_1_addr</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>3</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>137</item> <item>138</item> <item>139</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>41</id> <name>c_3_1_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>140</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>42</id> <name>shift_reg_p1_addr</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>141</item> <item>142</item> <item>143</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>43</id> <name>shift_reg_p1_load</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>144</item> </oprand_edges> <opcode>load</opcode> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>44</id> <name>tmp_4</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>145</item> <item>146</item> <item>147</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>45</id> <name>p_shl</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>35</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>149</item> <item>150</item> <item>152</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>46</id> <name>mt</name> <fileName>mac.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>46</lineNumber> <contextFuncName>mac</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> <item> <first> <first>mac.c</first> <second>mac</second> </first> <second>46</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>35</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>153</item> <item>154</item> </oprand_edges> <opcode>sub</opcode> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>47</id> <name>m_1</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName>m</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>35</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>155</item> <item>156</item> <item>158</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>48</id> <name>tmp_59_i6</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>159</item> </oprand_edges> <opcode>sext</opcode> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>49</id> <name>acc1</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>33</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>33</second> </item> </second> </item> </inlineStackInfo> <originalName>acc1</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>38</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>160</item> <item>161</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>50</id> <name>tmp_12</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>25</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>25</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>7</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>162</item> <item>163</item> <item>164</item> </oprand_edges> <opcode>bitconcatenate</opcode> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>51</id> <name>tmp_13</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>35</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>35</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>165</item> </oprand_edges> <opcode>zext</opcode> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>52</id> <name>shift_reg_p0_addr_1</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>35</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>35</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>166</item> <item>167</item> <item>168</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>53</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>35</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>35</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>169</item> <item>170</item> <item>229</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>54</id> <name>shift_reg_p1_addr_1</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>36</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>36</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>171</item> <item>172</item> <item>173</item> </oprand_edges> <opcode>getelementptr</opcode> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>55</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>36</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>36</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>174</item> <item>175</item> <item>228</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>56</id> <name>tmp_14</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>38</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>38</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>177</item> <item>178</item> <item>180</item> <item>182</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>57</id> <name>tmp_15</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>38</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>38</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>183</item> <item>184</item> <item>185</item> <item>186</item> </oprand_edges> <opcode>partselect</opcode> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>58</id> <name>tmp_16</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>38</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>38</second> </item> </second> </item> </inlineStackInfo> <originalName>y</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>18</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>187</item> <item>188</item> <item>189</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>59</id> <name>tmp_7</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>39</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>39</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>190</item> <item>192</item> </oprand_edges> <opcode>icmp</opcode> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>60</id> <name>or_cond5</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>39</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>39</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>193</item> <item>194</item> </oprand_edges> <opcode>and</opcode> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>61</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>39</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>39</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>195</item> <item>196</item> <item>197</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>63</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>40</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>40</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>199</item> <item>200</item> <item>232</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>64</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>40</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>40</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>201</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>66</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>41</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>41</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>202</item> <item>203</item> <item>204</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>68</id> <name>tmp_8</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>42</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>42</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>205</item> <item>206</item> </oprand_edges> <opcode>add</opcode> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>69</id> <name>tmp_1</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>42</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>42</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>207</item> <item>208</item> <item>209</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>70</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>42</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>42</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>210</item> <item>211</item> <item>233</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>71</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>42</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>42</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>212</item> </oprand_edges> <opcode>br</opcode> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>73</id> <name>inc_4</name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>44</second> </item> </second> </item> </inlineStackInfo> <originalName>inc</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>6</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>213</item> <item>214</item> <item>215</item> </oprand_edges> <opcode>select</opcode> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>74</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>44</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>44</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>216</item> <item>217</item> <item>231</item> </oprand_edges> <opcode>store</opcode> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>75</id> <name></name> <fileName>imf3.c</fileName> <fileDirectory>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</fileDirectory> <lineNumber>45</lineNumber> <contextFuncName>imf3</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>d:/opt/source/Vivado/Vivado_HLS_Tutorial/RTL_Verification/lab1</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>imf3.c</first> <second>imf3</second> </first> <second>45</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>218</item> </oprand_edges> <opcode>ret</opcode> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>12</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_62"> <Value> <Obj> <type>2</type> <id>82</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>6</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_63"> <Value> <Obj> <type>2</type> <id>96</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>6</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_64"> <Value> <Obj> <type>2</type> <id>102</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>3</content> </item> <item class_id_reference="16" object_id="_65"> <Value> <Obj> <type>2</type> <id>106</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="_66"> <Value> <Obj> <type>2</type> <id>112</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>6</bitwidth> </Value> <const_type>0</const_type> <content>5</content> </item> <item class_id_reference="16" object_id="_67"> <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>38</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_68"> <Value> <Obj> <type>2</type> <id>151</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>17</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_69"> <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>35</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_70"> <Value> <Obj> <type>2</type> <id>179</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>17</content> </item> <item class_id_reference="16" object_id="_71"> <Value> <Obj> <type>2</type> <id>181</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>34</content> </item> <item class_id_reference="16" object_id="_72"> <Value> <Obj> <type>2</type> <id>191</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>6</bitwidth> </Value> <const_type>0</const_type> <content>15</content> </item> <item class_id_reference="16" object_id="_73"> <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>1</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> </consts> <blocks class_id="17" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="18" tracking_level="1" version="0" object_id="_74"> <Obj> <type>3</type> <id>15</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>10</item> <item>11</item> <item>12</item> <item>13</item> <item>14</item> </node_objs> </item> <item class_id_reference="18" object_id="_75"> <Obj> <type>3</type> <id>18</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>2</count> <item_version>0</item_version> <item>16</item> <item>17</item> </node_objs> </item> <item class_id_reference="18" object_id="_76"> <Obj> <type>3</type> <id>62</id> <name>._crit_edge_ifconv</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>43</count> <item_version>0</item_version> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <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> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>58</item> <item>59</item> <item>60</item> <item>61</item> </node_objs> </item> <item class_id_reference="18" object_id="_77"> <Obj> <type>3</type> <id>65</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>2</count> <item_version>0</item_version> <item>63</item> <item>64</item> </node_objs> </item> <item class_id_reference="18" object_id="_78"> <Obj> <type>3</type> <id>67</id> <name>._crit_edge8</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>66</item> </node_objs> </item> <item class_id_reference="18" object_id="_79"> <Obj> <type>3</type> <id>72</id> <name>._crit_edge10</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>68</item> <item>69</item> <item>70</item> <item>71</item> </node_objs> </item> <item class_id_reference="18" object_id="_80"> <Obj> <type>3</type> <id>76</id> <name>._crit_edge9</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>3</count> <item_version>0</item_version> <item>73</item> <item>74</item> <item>75</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>133</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_81"> <id>79</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_82"> <id>80</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>11</sink_obj> </item> <item class_id_reference="20" object_id="_83"> <id>81</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_84"> <id>83</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>12</sink_obj> </item> <item class_id_reference="20" object_id="_85"> <id>84</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>13</sink_obj> </item> <item class_id_reference="20" object_id="_86"> <id>85</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_87"> <id>86</id> <edge_type>2</edge_type> <source_obj>62</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_88"> <id>87</id> <edge_type>2</edge_type> <source_obj>18</source_obj> <sink_obj>14</sink_obj> </item> <item class_id_reference="20" object_id="_89"> <id>88</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_90"> <id>89</id> <edge_type>1</edge_type> <source_obj>3</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_91"> <id>90</id> <edge_type>2</edge_type> <source_obj>62</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>91</id> <edge_type>1</edge_type> <source_obj>10</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>92</id> <edge_type>2</edge_type> <source_obj>18</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>93</id> <edge_type>1</edge_type> <source_obj>13</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>94</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>95</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>97</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>98</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>101</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>103</id> <edge_type>1</edge_type> <source_obj>102</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>104</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>105</id> <edge_type>1</edge_type> <source_obj>5</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>107</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>108</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>109</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>110</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>111</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>113</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>114</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>115</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>118</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>119</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>120</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>121</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>122</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>123</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>124</id> <edge_type>1</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>125</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>127</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>128</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>129</id> <edge_type>1</edge_type> <source_obj>25</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>130</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>131</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>132</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>133</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>134</id> <edge_type>1</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>135</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>136</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>137</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>138</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>139</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>140</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>141</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>142</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>143</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>144</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>145</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>146</id> <edge_type>1</edge_type> <source_obj>126</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>147</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>150</id> <edge_type>1</edge_type> <source_obj>19</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>152</id> <edge_type>1</edge_type> <source_obj>151</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>153</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>154</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>155</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>156</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>158</id> <edge_type>1</edge_type> <source_obj>157</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>159</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>160</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>161</id> <edge_type>1</edge_type> <source_obj>48</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>163</id> <edge_type>1</edge_type> <source_obj>11</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>164</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>165</id> <edge_type>1</edge_type> <source_obj>50</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>166</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>167</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>168</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>169</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>170</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>171</id> <edge_type>1</edge_type> <source_obj>9</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>172</id> <edge_type>1</edge_type> <source_obj>106</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>173</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>174</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>175</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>178</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>180</id> <edge_type>1</edge_type> <source_obj>179</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>182</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>184</id> <edge_type>1</edge_type> <source_obj>49</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>185</id> <edge_type>1</edge_type> <source_obj>179</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>186</id> <edge_type>1</edge_type> <source_obj>181</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>187</id> <edge_type>1</edge_type> <source_obj>12</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>188</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>189</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>190</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>192</id> <edge_type>1</edge_type> <source_obj>191</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>193</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>194</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>195</id> <edge_type>1</edge_type> <source_obj>60</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>196</id> <edge_type>2</edge_type> <source_obj>67</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>197</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>199</id> <edge_type>1</edge_type> <source_obj>198</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>200</id> <edge_type>1</edge_type> <source_obj>6</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>201</id> <edge_type>2</edge_type> <source_obj>67</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>202</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>203</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>204</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>205</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>206</id> <edge_type>1</edge_type> <source_obj>96</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>207</id> <edge_type>1</edge_type> <source_obj>59</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>208</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>209</id> <edge_type>1</edge_type> <source_obj>68</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>210</id> <edge_type>1</edge_type> <source_obj>69</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>211</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>212</id> <edge_type>2</edge_type> <source_obj>76</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>213</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>214</id> <edge_type>1</edge_type> <source_obj>82</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>215</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>216</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>217</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>218</id> <edge_type>1</edge_type> <source_obj>58</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>219</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>220</id> <edge_type>2</edge_type> <source_obj>15</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>221</id> <edge_type>2</edge_type> <source_obj>18</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>222</id> <edge_type>2</edge_type> <source_obj>62</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>223</id> <edge_type>2</edge_type> <source_obj>62</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>224</id> <edge_type>2</edge_type> <source_obj>65</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>225</id> <edge_type>2</edge_type> <source_obj>67</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>226</id> <edge_type>2</edge_type> <source_obj>67</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>227</id> <edge_type>2</edge_type> <source_obj>72</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>228</id> <edge_type>4</edge_type> <source_obj>43</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>229</id> <edge_type>4</edge_type> <source_obj>32</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>230</id> <edge_type>4</edge_type> <source_obj>13</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>231</id> <edge_type>4</edge_type> <source_obj>11</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>232</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>233</id> <edge_type>4</edge_type> <source_obj>21</source_obj> <sink_obj>70</sink_obj> </item> </edges> </cdfg> <cdfg_regions class_id="21" tracking_level="0" version="0"> <count>1</count> <item_version>0</item_version> <item class_id="22" tracking_level="1" version="0" object_id="_214"> <mId>1</mId> <mTag>duc_imf3</mTag> <mType>0</mType> <sub_regions> <count>0</count> <item_version>0</item_version> </sub_regions> <basic_blocks> <count>7</count> <item_version>0</item_version> <item>15</item> <item>18</item> <item>62</item> <item>65</item> <item>67</item> <item>72</item> <item>76</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>7</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> </cdfg_regions> <fsm class_id="-1"></fsm> <res class_id="25" tracking_level="1" version="0" object_id="_215"> <dp_component_resource class_id="26" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_resource> <dp_expression_resource> <count>0</count> <item_version>0</item_version> </dp_expression_resource> <dp_fifo_resource> <count>0</count> <item_version>0</item_version> </dp_fifo_resource> <dp_memory_resource> <count>0</count> <item_version>0</item_version> </dp_memory_resource> <dp_multiplexer_resource> <count>0</count> <item_version>0</item_version> </dp_multiplexer_resource> <dp_register_resource> <count>0</count> <item_version>0</item_version> </dp_register_resource> <dp_component_map class_id="27" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_component_map> <dp_expression_map> <count>0</count> <item_version>0</item_version> </dp_expression_map> <dp_fifo_map> <count>0</count> <item_version>0</item_version> </dp_fifo_map> <dp_memory_map> <count>0</count> <item_version>0</item_version> </dp_memory_map> </res> <node_label_latency class_id="28" tracking_level="0" version="0"> <count>60</count> <item_version>0</item_version> <item class_id="29" tracking_level="0" version="0"> <first>10</first> <second class_id="30" tracking_level="0" version="0"> <first>1</first> <second>0</second> </second> </item> <item> <first>11</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>12</first> <second> <first>0</first> <second>0</second> </second> </item> <item> <first>13</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>14</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>20</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</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>1</second> </second> </item> <item> <first>26</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>32</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>33</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>3</first> <second>2</second> </second> </item> <item> <first>38</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>5</first> <second>1</second> </second> </item> <item> <first>40</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>42</first> <second> <first>2</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>2</first> <second>1</second> </second> </item> <item> <first>44</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>3</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>4</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>51</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>6</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>5</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>61</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>70</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>71</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>7</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>7</first> <second>0</second> </second> </item> </node_label_latency> <bblk_ent_exit class_id="31" tracking_level="0" version="0"> <count>7</count> <item_version>0</item_version> <item class_id="32" tracking_level="0" version="0"> <first>15</first> <second class_id="33" tracking_level="0" version="0"> <first>0</first> <second>1</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>62</first> <second> <first>1</first> <second>7</second> </second> </item> <item> <first>65</first> <second> <first>7</first> <second>7</second> </second> </item> <item> <first>67</first> <second> <first>7</first> <second>7</second> </second> </item> <item> <first>72</first> <second> <first>7</first> <second>7</second> </second> </item> <item> <first>76</first> <second> <first>7</first> <second>7</second> </second> </item> </bblk_ent_exit> <regions class_id="34" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </regions> <dp_fu_nodes class_id="35" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_fu_nodes> <dp_fu_nodes_expression class_id="36" 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="37" 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="38" tracking_level="0" version="0"> <count>0</count> <item_version>0</item_version> </dp_port_io_nodes> <port2core class_id="39" 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>
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <!DOCTYPE boost_serialization> <boost_serialization signature="serialization::archive" version="14"> <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>aes_mixColumns</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>buf_r</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>buf</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</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>buf_offset</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> <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>73</count> <item_version>0</item_version> <item class_id="9" tracking_level="1" version="0" object_id="_3"> <Value> <Obj> <type>0</type> <id>4</id> <name>buf_offset_read</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> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>87</item> <item>88</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_4"> <Value> <Obj> <type>0</type> <id>5</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>243</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item class_id="11" tracking_level="0" version="0"> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</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>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>243</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>89</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_5"> <Value> <Obj> <type>0</type> <id>7</id> <name>i</name> <fileName></fileName> <fileDirectory></fileDirectory> <lineNumber>0</lineNumber> <contextFuncName></contextFuncName> <inlineStackInfo> <count>0</count> <item_version>0</item_version> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>5</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>91</item> <item>92</item> <item>93</item> <item>94</item> </oprand_edges> <opcode>phi</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_6"> <Value> <Obj> <type>0</type> <id>8</id> <name>tmp</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>243</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>243</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>96</item> <item>97</item> <item>99</item> </oprand_edges> <opcode>bitselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_7"> <Value> <Obj> <type>0</type> <id>9</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>243</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>243</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>100</item> <item>101</item> <item>102</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_8"> <Value> <Obj> <type>0</type> <id>15</id> <name>tmp_s</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>103</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_9"> <Value> <Obj> <type>0</type> <id>16</id> <name>tmp_10</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>104</item> </oprand_edges> <opcode>trunc</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_10"> <Value> <Obj> <type>0</type> <id>17</id> <name>sum</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>105</item> <item>106</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_11"> <Value> <Obj> <type>0</type> <id>18</id> <name>buf_addr</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</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>107</item> <item>108</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_12"> <Value> <Obj> <type>0</type> <id>19</id> <name>a_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</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>110</item> <item>111</item> <item>113</item> </oprand_edges> <opcode>readreq</opcode> <m_Display>2</m_Display> </item> <item class_id_reference="9" object_id="_13"> <Value> <Obj> <type>0</type> <id>20</id> <name>a</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName>a</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>115</item> <item>116</item> <item>348</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_14"> <Value> <Obj> <type>0</type> <id>21</id> <name>tmp_2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>117</item> <item>119</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_15"> <Value> <Obj> <type>0</type> <id>22</id> <name>tmp_2_cast</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>120</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_16"> <Value> <Obj> <type>0</type> <id>23</id> <name>sum1</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>121</item> <item>122</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_17"> <Value> <Obj> <type>0</type> <id>24</id> <name>buf_addr_25</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</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>123</item> <item>124</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_18"> <Value> <Obj> <type>0</type> <id>25</id> <name>b_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>125</item> <item>126</item> <item>127</item> <item>349</item> </oprand_edges> <opcode>readreq</opcode> <m_Display>2</m_Display> </item> <item class_id_reference="9" object_id="_19"> <Value> <Obj> <type>0</type> <id>26</id> <name>b</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName>b</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>128</item> <item>129</item> <item>344</item> <item>346</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_20"> <Value> <Obj> <type>0</type> <id>27</id> <name>tmp_3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>130</item> <item>132</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_21"> <Value> <Obj> <type>0</type> <id>28</id> <name>tmp_3_cast</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>133</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_22"> <Value> <Obj> <type>0</type> <id>29</id> <name>sum2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>134</item> <item>135</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_23"> <Value> <Obj> <type>0</type> <id>30</id> <name>buf_addr_26</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</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>136</item> <item>137</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_24"> <Value> <Obj> <type>0</type> <id>31</id> <name>c_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>138</item> <item>139</item> <item>140</item> <item>345</item> </oprand_edges> <opcode>readreq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_25"> <Value> <Obj> <type>0</type> <id>32</id> <name>c</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName>c</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>141</item> <item>142</item> <item>340</item> <item>342</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_26"> <Value> <Obj> <type>0</type> <id>33</id> <name>tmp_4</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>4</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>143</item> <item>145</item> </oprand_edges> <opcode>or</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_27"> <Value> <Obj> <type>0</type> <id>34</id> <name>tmp_4_cast</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>1</count> <item_version>0</item_version> <item>146</item> </oprand_edges> <opcode>zext</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_28"> <Value> <Obj> <type>0</type> <id>35</id> <name>sum3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>32</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>147</item> <item>148</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_29"> <Value> <Obj> <type>0</type> <id>36</id> <name>buf_addr_27</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</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>149</item> <item>150</item> </oprand_edges> <opcode>getelementptr</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_30"> <Value> <Obj> <type>0</type> <id>37</id> <name>d_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>151</item> <item>152</item> <item>153</item> <item>341</item> </oprand_edges> <opcode>readreq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_31"> <Value> <Obj> <type>0</type> <id>38</id> <name>d</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>250</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>250</second> </item> </second> </item> </inlineStackInfo> <originalName>d</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>154</item> <item>155</item> <item>337</item> <item>338</item> </oprand_edges> <opcode>read</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_32"> <Value> <Obj> <type>0</type> <id>39</id> <name>x_assign</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>251</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>251</second> </item> </second> </item> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>156</item> <item>157</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_33"> <Value> <Obj> <type>0</type> <id>40</id> <name>tmp_6</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>251</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>251</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>158</item> <item>159</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_34"> <Value> <Obj> <type>0</type> <id>41</id> <name>e</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>251</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>251</second> </item> </second> </item> </inlineStackInfo> <originalName>e</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>160</item> <item>161</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_35"> <Value> <Obj> <type>0</type> <id>42</id> <name>tmp_11</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>163</item> <item>164</item> <item>166</item> </oprand_edges> <opcode>bitselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_36"> <Value> <Obj> <type>0</type> <id>43</id> <name>tmp_12</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>167</item> <item>169</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_37"> <Value> <Obj> <type>0</type> <id>44</id> <name>tmp_2_i</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>170</item> <item>172</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_38"> <Value> <Obj> <type>0</type> <id>45</id> <name>tmp_4_i</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>173</item> <item>174</item> <item>175</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_39"> <Value> <Obj> <type>0</type> <id>46</id> <name>tmp1</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</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>176</item> <item>177</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_40"> <Value> <Obj> <type>0</type> <id>47</id> <name>tmp_9</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</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>178</item> <item>179</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_41"> <Value> <Obj> <type>0</type> <id>48</id> <name>buf_addr_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>181</item> <item>182</item> <item>183</item> <item>347</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_42"> <Value> <Obj> <type>0</type> <id>49</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>185</item> <item>186</item> <item>187</item> <item>189</item> <item>335</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_43"> <Value> <Obj> <type>0</type> <id>50</id> <name>buf_addr_resp</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</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>191</item> <item>192</item> <item>333</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_44"> <Value> <Obj> <type>0</type> <id>51</id> <name>x_assign_1</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>193</item> <item>194</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_45"> <Value> <Obj> <type>0</type> <id>52</id> <name>tmp_13</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>195</item> <item>196</item> <item>197</item> </oprand_edges> <opcode>bitselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_46"> <Value> <Obj> <type>0</type> <id>53</id> <name>tmp_14</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>198</item> <item>199</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_47"> <Value> <Obj> <type>0</type> <id>54</id> <name>tmp_2_i1</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>200</item> <item>201</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_48"> <Value> <Obj> <type>0</type> <id>55</id> <name>tmp_4_i1</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>202</item> <item>203</item> <item>204</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_49"> <Value> <Obj> <type>0</type> <id>56</id> <name>tmp2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</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>205</item> <item>206</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_50"> <Value> <Obj> <type>0</type> <id>57</id> <name>tmp_5</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</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>207</item> <item>208</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_51"> <Value> <Obj> <type>0</type> <id>58</id> <name>buf_addr_25_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>209</item> <item>210</item> <item>211</item> <item>334</item> <item>343</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_52"> <Value> <Obj> <type>0</type> <id>59</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>212</item> <item>213</item> <item>214</item> <item>215</item> <item>331</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_53"> <Value> <Obj> <type>0</type> <id>60</id> <name>buf_addr_25_resp</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>252</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>252</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>216</item> <item>217</item> <item>329</item> <item>332</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_54"> <Value> <Obj> <type>0</type> <id>61</id> <name>x_assign_2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>218</item> <item>219</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_55"> <Value> <Obj> <type>0</type> <id>62</id> <name>tmp_15</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>220</item> <item>221</item> <item>222</item> </oprand_edges> <opcode>bitselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_56"> <Value> <Obj> <type>0</type> <id>63</id> <name>tmp_16</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>223</item> <item>224</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_57"> <Value> <Obj> <type>0</type> <id>64</id> <name>tmp_2_i2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>225</item> <item>226</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_58"> <Value> <Obj> <type>0</type> <id>65</id> <name>tmp_4_i2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>227</item> <item>228</item> <item>229</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_59"> <Value> <Obj> <type>0</type> <id>66</id> <name>tmp3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</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>230</item> <item>231</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_60"> <Value> <Obj> <type>0</type> <id>67</id> <name>tmp_7</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</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>232</item> <item>233</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_61"> <Value> <Obj> <type>0</type> <id>68</id> <name>buf_addr_26_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>234</item> <item>235</item> <item>236</item> <item>330</item> <item>339</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_62"> <Value> <Obj> <type>0</type> <id>69</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>237</item> <item>238</item> <item>239</item> <item>240</item> <item>327</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_63"> <Value> <Obj> <type>0</type> <id>70</id> <name>buf_addr_26_resp</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>241</item> <item>242</item> <item>325</item> <item>328</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_64"> <Value> <Obj> <type>0</type> <id>71</id> <name>x_assign_3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName>x</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>243</item> <item>244</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_65"> <Value> <Obj> <type>0</type> <id>72</id> <name>tmp_17</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>245</item> <item>246</item> <item>247</item> </oprand_edges> <opcode>bitselect</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_66"> <Value> <Obj> <type>0</type> <id>73</id> <name>tmp_18</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>248</item> <item>249</item> </oprand_edges> <opcode>shl</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_67"> <Value> <Obj> <type>0</type> <id>74</id> <name>tmp_2_i3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</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>250</item> <item>251</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_68"> <Value> <Obj> <type>0</type> <id>75</id> <name>tmp_4_i3</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>174</lineNumber> <contextFuncName>rj_xtime</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>2</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>rj_xtime</second> </first> <second>174</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>8</bitwidth> </Value> <oprand_edges> <count>3</count> <item_version>0</item_version> <item>252</item> <item>253</item> <item>254</item> </oprand_edges> <opcode>select</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_69"> <Value> <Obj> <type>0</type> <id>76</id> <name>tmp_8</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</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>255</item> <item>256</item> </oprand_edges> <opcode>xor</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_70"> <Value> <Obj> <type>0</type> <id>77</id> <name>buf_addr_27_req</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>257</item> <item>258</item> <item>259</item> <item>326</item> <item>336</item> </oprand_edges> <opcode>writereq</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_71"> <Value> <Obj> <type>0</type> <id>78</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>0</bitwidth> </Value> <oprand_edges> <count>5</count> <item_version>0</item_version> <item>260</item> <item>261</item> <item>262</item> <item>263</item> <item>323</item> </oprand_edges> <opcode>write</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_72"> <Value> <Obj> <type>0</type> <id>79</id> <name>buf_addr_27_resp</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>253</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>253</second> </item> </second> </item> </inlineStackInfo> <originalName></originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>1</bitwidth> </Value> <oprand_edges> <count>4</count> <item_version>0</item_version> <item>264</item> <item>265</item> <item>322</item> <item>324</item> </oprand_edges> <opcode>writeresp</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_73"> <Value> <Obj> <type>0</type> <id>81</id> <name>i_2</name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>243</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>243</second> </item> </second> </item> </inlineStackInfo> <originalName>i</originalName> <rtlName></rtlName> <coreName></coreName> </Obj> <bitwidth>5</bitwidth> </Value> <oprand_edges> <count>2</count> <item_version>0</item_version> <item>267</item> <item>268</item> </oprand_edges> <opcode>add</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_74"> <Value> <Obj> <type>0</type> <id>82</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>243</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>243</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>269</item> </oprand_edges> <opcode>br</opcode> <m_Display>0</m_Display> </item> <item class_id_reference="9" object_id="_75"> <Value> <Obj> <type>0</type> <id>84</id> <name></name> <fileName>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</fileName> <fileDirectory>/scratch/local/tmp.soPlafqy6w/_sds/vhls</fileDirectory> <lineNumber>255</lineNumber> <contextFuncName>aes_mixColumns</contextFuncName> <inlineStackInfo> <count>1</count> <item_version>0</item_version> <item> <first>/scratch/local/tmp.soPlafqy6w/_sds/vhls</first> <second> <count>1</count> <item_version>0</item_version> <item> <first> <first>/mnt/icgridio2/safe/giesen/HLS_tuner/1/TestApps/MachSuite/aes/Sources/aes.c</first> <second>aes_mixColumns</second> </first> <second>255</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> </item> </nodes> <consts class_id="15" tracking_level="0" version="0"> <count>11</count> <item_version>0</item_version> <item class_id="16" tracking_level="1" version="0" object_id="_76"> <Value> <Obj> <type>2</type> <id>90</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>5</bitwidth> </Value> <const_type>0</const_type> <content>0</content> </item> <item class_id_reference="16" object_id="_77"> <Value> <Obj> <type>2</type> <id>98</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="_78"> <Value> <Obj> <type>2</type> <id>112</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="_79"> <Value> <Obj> <type>2</type> <id>118</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>4</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_80"> <Value> <Obj> <type>2</type> <id>131</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>4</bitwidth> </Value> <const_type>0</const_type> <content>2</content> </item> <item class_id_reference="16" object_id="_81"> <Value> <Obj> <type>2</type> <id>144</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>4</bitwidth> </Value> <const_type>0</const_type> <content>3</content> </item> <item class_id_reference="16" object_id="_82"> <Value> <Obj> <type>2</type> <id>165</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>7</content> </item> <item class_id_reference="16" object_id="_83"> <Value> <Obj> <type>2</type> <id>168</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="_84"> <Value> <Obj> <type>2</type> <id>171</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>27</content> </item> <item class_id_reference="16" object_id="_85"> <Value> <Obj> <type>2</type> <id>188</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>1</bitwidth> </Value> <const_type>0</const_type> <content>1</content> </item> <item class_id_reference="16" object_id="_86"> <Value> <Obj> <type>2</type> <id>266</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>5</bitwidth> </Value> <const_type>0</const_type> <content>4</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="_87"> <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>2</count> <item_version>0</item_version> <item>4</item> <item>5</item> </node_objs> </item> <item class_id_reference="18" object_id="_88"> <Obj> <type>3</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> <node_objs> <count>3</count> <item_version>0</item_version> <item>7</item> <item>8</item> <item>9</item> </node_objs> </item> <item class_id_reference="18" object_id="_89"> <Obj> <type>3</type> <id>83</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>67</count> <item_version>0</item_version> <item>15</item> <item>16</item> <item>17</item> <item>18</item> <item>19</item> <item>20</item> <item>21</item> <item>22</item> <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> <item>40</item> <item>41</item> <item>42</item> <item>43</item> <item>44</item> <item>45</item> <item>46</item> <item>47</item> <item>48</item> <item>49</item> <item>50</item> <item>51</item> <item>52</item> <item>53</item> <item>54</item> <item>55</item> <item>56</item> <item>57</item> <item>58</item> <item>59</item> <item>60</item> <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> <item>70</item> <item>71</item> <item>72</item> <item>73</item> <item>74</item> <item>75</item> <item>76</item> <item>77</item> <item>78</item> <item>79</item> <item>81</item> <item>82</item> </node_objs> </item> <item class_id_reference="18" object_id="_90"> <Obj> <type>3</type> <id>85</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>84</item> </node_objs> </item> </blocks> <edges class_id="19" tracking_level="0" version="0"> <count>171</count> <item_version>0</item_version> <item class_id="20" tracking_level="1" version="0" object_id="_91"> <id>88</id> <edge_type>1</edge_type> <source_obj>2</source_obj> <sink_obj>4</sink_obj> </item> <item class_id_reference="20" object_id="_92"> <id>89</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>5</sink_obj> </item> <item class_id_reference="20" object_id="_93"> <id>91</id> <edge_type>1</edge_type> <source_obj>90</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_94"> <id>92</id> <edge_type>2</edge_type> <source_obj>6</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_95"> <id>93</id> <edge_type>1</edge_type> <source_obj>81</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_96"> <id>94</id> <edge_type>2</edge_type> <source_obj>83</source_obj> <sink_obj>7</sink_obj> </item> <item class_id_reference="20" object_id="_97"> <id>97</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_98"> <id>99</id> <edge_type>1</edge_type> <source_obj>98</source_obj> <sink_obj>8</sink_obj> </item> <item class_id_reference="20" object_id="_99"> <id>100</id> <edge_type>1</edge_type> <source_obj>8</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_100"> <id>101</id> <edge_type>2</edge_type> <source_obj>83</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_101"> <id>102</id> <edge_type>2</edge_type> <source_obj>85</source_obj> <sink_obj>9</sink_obj> </item> <item class_id_reference="20" object_id="_102"> <id>103</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>15</sink_obj> </item> <item class_id_reference="20" object_id="_103"> <id>104</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>16</sink_obj> </item> <item class_id_reference="20" object_id="_104"> <id>105</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_105"> <id>106</id> <edge_type>1</edge_type> <source_obj>15</source_obj> <sink_obj>17</sink_obj> </item> <item class_id_reference="20" object_id="_106"> <id>107</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_107"> <id>108</id> <edge_type>1</edge_type> <source_obj>17</source_obj> <sink_obj>18</sink_obj> </item> <item class_id_reference="20" object_id="_108"> <id>111</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_109"> <id>113</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>19</sink_obj> </item> <item class_id_reference="20" object_id="_110"> <id>116</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_111"> <id>117</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_112"> <id>119</id> <edge_type>1</edge_type> <source_obj>118</source_obj> <sink_obj>21</sink_obj> </item> <item class_id_reference="20" object_id="_113"> <id>120</id> <edge_type>1</edge_type> <source_obj>21</source_obj> <sink_obj>22</sink_obj> </item> <item class_id_reference="20" object_id="_114"> <id>121</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_115"> <id>122</id> <edge_type>1</edge_type> <source_obj>22</source_obj> <sink_obj>23</sink_obj> </item> <item class_id_reference="20" object_id="_116"> <id>123</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_117"> <id>124</id> <edge_type>1</edge_type> <source_obj>23</source_obj> <sink_obj>24</sink_obj> </item> <item class_id_reference="20" object_id="_118"> <id>126</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_119"> <id>127</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>25</sink_obj> </item> <item class_id_reference="20" object_id="_120"> <id>129</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_121"> <id>130</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_122"> <id>132</id> <edge_type>1</edge_type> <source_obj>131</source_obj> <sink_obj>27</sink_obj> </item> <item class_id_reference="20" object_id="_123"> <id>133</id> <edge_type>1</edge_type> <source_obj>27</source_obj> <sink_obj>28</sink_obj> </item> <item class_id_reference="20" object_id="_124"> <id>134</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_125"> <id>135</id> <edge_type>1</edge_type> <source_obj>28</source_obj> <sink_obj>29</sink_obj> </item> <item class_id_reference="20" object_id="_126"> <id>136</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_127"> <id>137</id> <edge_type>1</edge_type> <source_obj>29</source_obj> <sink_obj>30</sink_obj> </item> <item class_id_reference="20" object_id="_128"> <id>139</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_129"> <id>140</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_130"> <id>142</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_131"> <id>143</id> <edge_type>1</edge_type> <source_obj>16</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_132"> <id>145</id> <edge_type>1</edge_type> <source_obj>144</source_obj> <sink_obj>33</sink_obj> </item> <item class_id_reference="20" object_id="_133"> <id>146</id> <edge_type>1</edge_type> <source_obj>33</source_obj> <sink_obj>34</sink_obj> </item> <item class_id_reference="20" object_id="_134"> <id>147</id> <edge_type>1</edge_type> <source_obj>4</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_135"> <id>148</id> <edge_type>1</edge_type> <source_obj>34</source_obj> <sink_obj>35</sink_obj> </item> <item class_id_reference="20" object_id="_136"> <id>149</id> <edge_type>1</edge_type> <source_obj>1</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_137"> <id>150</id> <edge_type>1</edge_type> <source_obj>35</source_obj> <sink_obj>36</sink_obj> </item> <item class_id_reference="20" object_id="_138"> <id>152</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_139"> <id>153</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_140"> <id>155</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_141"> <id>156</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_142"> <id>157</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>39</sink_obj> </item> <item class_id_reference="20" object_id="_143"> <id>158</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_144"> <id>159</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>40</sink_obj> </item> <item class_id_reference="20" object_id="_145"> <id>160</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_146"> <id>161</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>41</sink_obj> </item> <item class_id_reference="20" object_id="_147"> <id>164</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_148"> <id>166</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>42</sink_obj> </item> <item class_id_reference="20" object_id="_149"> <id>167</id> <edge_type>1</edge_type> <source_obj>39</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_150"> <id>169</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>43</sink_obj> </item> <item class_id_reference="20" object_id="_151"> <id>170</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_152"> <id>172</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>44</sink_obj> </item> <item class_id_reference="20" object_id="_153"> <id>173</id> <edge_type>1</edge_type> <source_obj>42</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_154"> <id>174</id> <edge_type>1</edge_type> <source_obj>44</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_155"> <id>175</id> <edge_type>1</edge_type> <source_obj>43</source_obj> <sink_obj>45</sink_obj> </item> <item class_id_reference="20" object_id="_156"> <id>176</id> <edge_type>1</edge_type> <source_obj>45</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_157"> <id>177</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>46</sink_obj> </item> <item class_id_reference="20" object_id="_158"> <id>178</id> <edge_type>1</edge_type> <source_obj>46</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_159"> <id>179</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>47</sink_obj> </item> <item class_id_reference="20" object_id="_160"> <id>182</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_161"> <id>183</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_162"> <id>186</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_163"> <id>187</id> <edge_type>1</edge_type> <source_obj>47</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_164"> <id>189</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_165"> <id>192</id> <edge_type>1</edge_type> <source_obj>18</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_166"> <id>193</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_167"> <id>194</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>51</sink_obj> </item> <item class_id_reference="20" object_id="_168"> <id>196</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_169"> <id>197</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>52</sink_obj> </item> <item class_id_reference="20" object_id="_170"> <id>198</id> <edge_type>1</edge_type> <source_obj>51</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_171"> <id>199</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>53</sink_obj> </item> <item class_id_reference="20" object_id="_172"> <id>200</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_173"> <id>201</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>54</sink_obj> </item> <item class_id_reference="20" object_id="_174"> <id>202</id> <edge_type>1</edge_type> <source_obj>52</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_175"> <id>203</id> <edge_type>1</edge_type> <source_obj>54</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_176"> <id>204</id> <edge_type>1</edge_type> <source_obj>53</source_obj> <sink_obj>55</sink_obj> </item> <item class_id_reference="20" object_id="_177"> <id>205</id> <edge_type>1</edge_type> <source_obj>55</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_178"> <id>206</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>56</sink_obj> </item> <item class_id_reference="20" object_id="_179"> <id>207</id> <edge_type>1</edge_type> <source_obj>56</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_180"> <id>208</id> <edge_type>1</edge_type> <source_obj>26</source_obj> <sink_obj>57</sink_obj> </item> <item class_id_reference="20" object_id="_181"> <id>210</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_182"> <id>211</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_183"> <id>213</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_184"> <id>214</id> <edge_type>1</edge_type> <source_obj>57</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_185"> <id>215</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_186"> <id>217</id> <edge_type>1</edge_type> <source_obj>24</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_187"> <id>218</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_188"> <id>219</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>61</sink_obj> </item> <item class_id_reference="20" object_id="_189"> <id>221</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_190"> <id>222</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>62</sink_obj> </item> <item class_id_reference="20" object_id="_191"> <id>223</id> <edge_type>1</edge_type> <source_obj>61</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_192"> <id>224</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>63</sink_obj> </item> <item class_id_reference="20" object_id="_193"> <id>225</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_194"> <id>226</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>64</sink_obj> </item> <item class_id_reference="20" object_id="_195"> <id>227</id> <edge_type>1</edge_type> <source_obj>62</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_196"> <id>228</id> <edge_type>1</edge_type> <source_obj>64</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_197"> <id>229</id> <edge_type>1</edge_type> <source_obj>63</source_obj> <sink_obj>65</sink_obj> </item> <item class_id_reference="20" object_id="_198"> <id>230</id> <edge_type>1</edge_type> <source_obj>65</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_199"> <id>231</id> <edge_type>1</edge_type> <source_obj>41</source_obj> <sink_obj>66</sink_obj> </item> <item class_id_reference="20" object_id="_200"> <id>232</id> <edge_type>1</edge_type> <source_obj>66</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_201"> <id>233</id> <edge_type>1</edge_type> <source_obj>32</source_obj> <sink_obj>67</sink_obj> </item> <item class_id_reference="20" object_id="_202"> <id>235</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_203"> <id>236</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_204"> <id>238</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_205"> <id>239</id> <edge_type>1</edge_type> <source_obj>67</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_206"> <id>240</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_207"> <id>242</id> <edge_type>1</edge_type> <source_obj>30</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_208"> <id>243</id> <edge_type>1</edge_type> <source_obj>38</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_209"> <id>244</id> <edge_type>1</edge_type> <source_obj>20</source_obj> <sink_obj>71</sink_obj> </item> <item class_id_reference="20" object_id="_210"> <id>246</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_211"> <id>247</id> <edge_type>1</edge_type> <source_obj>165</source_obj> <sink_obj>72</sink_obj> </item> <item class_id_reference="20" object_id="_212"> <id>248</id> <edge_type>1</edge_type> <source_obj>71</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_213"> <id>249</id> <edge_type>1</edge_type> <source_obj>168</source_obj> <sink_obj>73</sink_obj> </item> <item class_id_reference="20" object_id="_214"> <id>250</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_215"> <id>251</id> <edge_type>1</edge_type> <source_obj>171</source_obj> <sink_obj>74</sink_obj> </item> <item class_id_reference="20" object_id="_216"> <id>252</id> <edge_type>1</edge_type> <source_obj>72</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_217"> <id>253</id> <edge_type>1</edge_type> <source_obj>74</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_218"> <id>254</id> <edge_type>1</edge_type> <source_obj>73</source_obj> <sink_obj>75</sink_obj> </item> <item class_id_reference="20" object_id="_219"> <id>255</id> <edge_type>1</edge_type> <source_obj>75</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_220"> <id>256</id> <edge_type>1</edge_type> <source_obj>40</source_obj> <sink_obj>76</sink_obj> </item> <item class_id_reference="20" object_id="_221"> <id>258</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_222"> <id>259</id> <edge_type>1</edge_type> <source_obj>112</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_223"> <id>261</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_224"> <id>262</id> <edge_type>1</edge_type> <source_obj>76</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_225"> <id>263</id> <edge_type>1</edge_type> <source_obj>188</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_226"> <id>265</id> <edge_type>1</edge_type> <source_obj>36</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_227"> <id>267</id> <edge_type>1</edge_type> <source_obj>266</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_228"> <id>268</id> <edge_type>1</edge_type> <source_obj>7</source_obj> <sink_obj>81</sink_obj> </item> <item class_id_reference="20" object_id="_229"> <id>269</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>82</sink_obj> </item> <item class_id_reference="20" object_id="_230"> <id>318</id> <edge_type>2</edge_type> <source_obj>6</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_231"> <id>319</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>85</sink_obj> </item> <item class_id_reference="20" object_id="_232"> <id>320</id> <edge_type>2</edge_type> <source_obj>10</source_obj> <sink_obj>83</sink_obj> </item> <item class_id_reference="20" object_id="_233"> <id>321</id> <edge_type>2</edge_type> <source_obj>83</source_obj> <sink_obj>10</sink_obj> </item> <item class_id_reference="20" object_id="_234"> <id>322</id> <edge_type>4</edge_type> <source_obj>78</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_235"> <id>323</id> <edge_type>4</edge_type> <source_obj>77</source_obj> <sink_obj>78</sink_obj> </item> <item class_id_reference="20" object_id="_236"> <id>324</id> <edge_type>4</edge_type> <source_obj>70</source_obj> <sink_obj>79</sink_obj> </item> <item class_id_reference="20" object_id="_237"> <id>325</id> <edge_type>4</edge_type> <source_obj>69</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_238"> <id>326</id> <edge_type>4</edge_type> <source_obj>69</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_239"> <id>327</id> <edge_type>4</edge_type> <source_obj>68</source_obj> <sink_obj>69</sink_obj> </item> <item class_id_reference="20" object_id="_240"> <id>328</id> <edge_type>4</edge_type> <source_obj>60</source_obj> <sink_obj>70</sink_obj> </item> <item class_id_reference="20" object_id="_241"> <id>329</id> <edge_type>4</edge_type> <source_obj>59</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_242"> <id>330</id> <edge_type>4</edge_type> <source_obj>59</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_243"> <id>331</id> <edge_type>4</edge_type> <source_obj>58</source_obj> <sink_obj>59</sink_obj> </item> <item class_id_reference="20" object_id="_244"> <id>332</id> <edge_type>4</edge_type> <source_obj>50</source_obj> <sink_obj>60</sink_obj> </item> <item class_id_reference="20" object_id="_245"> <id>333</id> <edge_type>4</edge_type> <source_obj>49</source_obj> <sink_obj>50</sink_obj> </item> <item class_id_reference="20" object_id="_246"> <id>334</id> <edge_type>4</edge_type> <source_obj>49</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_247"> <id>335</id> <edge_type>4</edge_type> <source_obj>48</source_obj> <sink_obj>49</sink_obj> </item> <item class_id_reference="20" object_id="_248"> <id>336</id> <edge_type>4</edge_type> <source_obj>38</source_obj> <sink_obj>77</sink_obj> </item> <item class_id_reference="20" object_id="_249"> <id>337</id> <edge_type>4</edge_type> <source_obj>37</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_250"> <id>338</id> <edge_type>4</edge_type> <source_obj>32</source_obj> <sink_obj>38</sink_obj> </item> <item class_id_reference="20" object_id="_251"> <id>339</id> <edge_type>4</edge_type> <source_obj>32</source_obj> <sink_obj>68</sink_obj> </item> <item class_id_reference="20" object_id="_252"> <id>340</id> <edge_type>4</edge_type> <source_obj>31</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_253"> <id>341</id> <edge_type>4</edge_type> <source_obj>31</source_obj> <sink_obj>37</sink_obj> </item> <item class_id_reference="20" object_id="_254"> <id>342</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>32</sink_obj> </item> <item class_id_reference="20" object_id="_255"> <id>343</id> <edge_type>4</edge_type> <source_obj>26</source_obj> <sink_obj>58</sink_obj> </item> <item class_id_reference="20" object_id="_256"> <id>344</id> <edge_type>4</edge_type> <source_obj>25</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_257"> <id>345</id> <edge_type>4</edge_type> <source_obj>25</source_obj> <sink_obj>31</sink_obj> </item> <item class_id_reference="20" object_id="_258"> <id>346</id> <edge_type>4</edge_type> <source_obj>20</source_obj> <sink_obj>26</sink_obj> </item> <item class_id_reference="20" object_id="_259"> <id>347</id> <edge_type>4</edge_type> <source_obj>20</source_obj> <sink_obj>48</sink_obj> </item> <item class_id_reference="20" object_id="_260"> <id>348</id> <edge_type>4</edge_type> <source_obj>19</source_obj> <sink_obj>20</sink_obj> </item> <item class_id_reference="20" object_id="_261"> <id>349</id> <edge_type>4</edge_type> <source_obj>19</source_obj> <sink_obj>25</sink_obj> </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="_262"> <mId>1</mId> <mTag>aes_mixColumns</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>82</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_263"> <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>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_264"> <mId>3</mId> <mTag>mix</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>10</item> <item>83</item> </basic_blocks> <mII>19</mII> <mDepth>24</mDepth> <mMinTripCount>4</mMinTripCount> <mMaxTripCount>4</mMaxTripCount> <mMinLatency>80</mMinLatency> <mMaxLatency>-1</mMaxLatency> <mIsDfPipe>0</mIsDfPipe> <mDfPipe class_id="-1"></mDfPipe> </item> <item class_id_reference="22" object_id="_265"> <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>85</item> </basic_blocks> <mII>-1</mII> <mDepth>-1</mDepth> <mMinTripCount>-1</mMinTripCount> <mMaxTripCount>-1</mMaxTripCount> <mMinLatency>0</mMinLatency> <mMaxLatency>-1</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>73</count> <item_version>0</item_version> <item class_id="27" tracking_level="0" version="0"> <first>4</first> <second class_id="28" tracking_level="0" version="0"> <first>0</first> <second>0</second> </second> </item> <item> <first>5</first> <second> <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>15</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>16</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>17</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>18</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>19</first> <second> <first>2</first> <second>6</second> </second> </item> <item> <first>20</first> <second> <first>9</first> <second>0</second> </second> </item> <item> <first>21</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>22</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>23</first> <second> <first>1</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>3</first> <second>6</second> </second> </item> <item> <first>26</first> <second> <first>10</first> <second>0</second> </second> </item> <item> <first>27</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>28</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>29</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>30</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>31</first> <second> <first>4</first> <second>6</second> </second> </item> <item> <first>32</first> <second> <first>11</first> <second>0</second> </second> </item> <item> <first>33</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>34</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>35</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>36</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>37</first> <second> <first>6</first> <second>6</second> </second> </item> <item> <first>38</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>39</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>40</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>41</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>42</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>43</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>44</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>45</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>46</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>47</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>48</first> <second> <first>12</first> <second>0</second> </second> </item> <item> <first>49</first> <second> <first>13</first> <second>0</second> </second> </item> <item> <first>50</first> <second> <first>14</first> <second>4</second> </second> </item> <item> <first>51</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>52</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>53</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>54</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>55</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>56</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>57</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>58</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>59</first> <second> <first>15</first> <second>0</second> </second> </item> <item> <first>60</first> <second> <first>16</first> <second>4</second> </second> </item> <item> <first>61</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>62</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>63</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>64</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>65</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>66</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>67</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>68</first> <second> <first>16</first> <second>0</second> </second> </item> <item> <first>69</first> <second> <first>17</first> <second>0</second> </second> </item> <item> <first>70</first> <second> <first>18</first> <second>4</second> </second> </item> <item> <first>71</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>72</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>73</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>74</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>75</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>76</first> <second> <first>14</first> <second>0</second> </second> </item> <item> <first>77</first> <second> <first>18</first> <second>0</second> </second> </item> <item> <first>78</first> <second> <first>19</first> <second>0</second> </second> </item> <item> <first>79</first> <second> <first>20</first> <second>4</second> </second> </item> <item> <first>81</first> <second> <first>1</first> <second>0</second> </second> </item> <item> <first>82</first> <second> <first>24</first> <second>0</second> </second> </item> <item> <first>84</first> <second> <first>2</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>10</first> <second> <first>1</first> <second>1</second> </second> </item> <item> <first>83</first> <second> <first>1</first> <second>24</second> </second> </item> <item> <first>85</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="_266"> <region_name>mix</region_name> <basic_blocks> <count>2</count> <item_version>0</item_version> <item>10</item> <item>83</item> </basic_blocks> <nodes> <count>0</count> <item_version>0</item_version> </nodes> <anchor_node>-1</anchor_node> <region_type>8</region_type> <interval>19</interval> <pipe_depth>24</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>
with Ada.Containers.Vectors; package body Moving is use Ada.Containers; package Number_Vectors is new Ada.Containers.Vectors (Element_Type => Number, Index_Type => Natural); Current_List : Number_Vectors.Vector := Number_Vectors.Empty_Vector; procedure Add_Number (N : Number) is begin if Natural (Current_List.Length) >= Max_Elements then Current_List.Delete_First; end if; Current_List.Append (N); end Add_Number; function Get_Average return Number is Average : Number := 0.0; procedure Sum (Position : Number_Vectors.Cursor) is begin Average := Average + Number_Vectors.Element (Position); end Sum; begin Current_List.Iterate (Sum'Access); if Current_List.Length > 1 then Average := Average / Number (Current_List.Length); end if; return Average; end Get_Average; function Moving_Average (N : Number) return Number is begin Add_Number (N); return Get_Average; end Moving_Average; end Moving;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S Y S T E M . A U X _ D E C -- -- -- -- S p e c -- -- -- -- Copyright (C) 2005 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, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, 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. -- -- -- ------------------------------------------------------------------------------ -- This package is to be used when the extra definitions in package -- System for DEC Ada implementations are not supported by the target. package System.Aux_DEC is pragma Pure; pragma Elaborate_Body; type AST_Handler is limited private; No_AST_Handler : constant AST_Handler; private type AST_Handler is new Integer; No_AST_Handler : constant AST_Handler := 0; end System.Aux_DEC;
------------------------------------------------------------------------------ -- -- -- 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. ------------------------------------------------------------------------------ -- A read extent action is an action that retrieves the current instances of -- a classifier. ------------------------------------------------------------------------------ with AMF.UML.Actions; limited with AMF.UML.Classifiers; limited with AMF.UML.Output_Pins; package AMF.UML.Read_Extent_Actions is pragma Preelaborate; type UML_Read_Extent_Action is limited interface and AMF.UML.Actions.UML_Action; type UML_Read_Extent_Action_Access is access all UML_Read_Extent_Action'Class; for UML_Read_Extent_Action_Access'Storage_Size use 0; not overriding function Get_Classifier (Self : not null access constant UML_Read_Extent_Action) return AMF.UML.Classifiers.UML_Classifier_Access is abstract; -- Getter of ReadExtentAction::classifier. -- -- The classifier whose instances are to be retrieved. not overriding procedure Set_Classifier (Self : not null access UML_Read_Extent_Action; To : AMF.UML.Classifiers.UML_Classifier_Access) is abstract; -- Setter of ReadExtentAction::classifier. -- -- The classifier whose instances are to be retrieved. not overriding function Get_Result (Self : not null access constant UML_Read_Extent_Action) return AMF.UML.Output_Pins.UML_Output_Pin_Access is abstract; -- Getter of ReadExtentAction::result. -- -- The runtime instances of the classifier. not overriding procedure Set_Result (Self : not null access UML_Read_Extent_Action; To : AMF.UML.Output_Pins.UML_Output_Pin_Access) is abstract; -- Setter of ReadExtentAction::result. -- -- The runtime instances of the classifier. end AMF.UML.Read_Extent_Actions;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- G N A T . M B B S _ D I S C R E T E _ R A N D O M -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-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/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- The implementation used in this package was contributed by Robert -- Eachus. It is based on the work of L. Blum, M. Blum, and M. Shub, SIAM -- Journal of Computing, Vol 15. No 2, May 1986. The particular choices for P -- and Q chosen here guarantee a period of 562,085,314,430,582 (about 2**49), -- and the generated sequence has excellent randomness properties. For further -- details, see the paper "Fast Generation of Trustworthy Random Numbers", by -- Robert Eachus, which describes both the algorithm and the efficient -- implementation approach used here. -- Formerly, this package was Ada.Numerics.Discrete_Random. It is retained -- here in part to allow users to reconstruct number sequences generated -- by previous versions. with Interfaces; generic type Result_Subtype is (<>); package GNAT.MBBS_Discrete_Random is -- The algorithm used here is reliable from a required statistical point of -- view only up to 48 bits. We try to behave reasonably in the case of -- larger types, but we can't guarantee the required properties. So -- generate a warning for these (slightly) dubious cases. pragma Compile_Time_Warning (Result_Subtype'Size > 48, "statistical properties not guaranteed for size > 48"); -- Basic facilities type Generator is limited private; function Random (Gen : Generator) return Result_Subtype; procedure Reset (Gen : Generator); procedure Reset (Gen : Generator; Initiator : Integer); -- Advanced facilities type State is private; procedure Save (Gen : Generator; To_State : out State); procedure Reset (Gen : Generator; From_State : State); Max_Image_Width : constant := 80; function Image (Of_State : State) return String; function Value (Coded_State : String) return State; private subtype Int is Interfaces.Integer_32; subtype Rst is Result_Subtype; -- We prefer to use 14 digits for Flt, but some targets are more limited type Flt is digits Positive'Min (14, Long_Long_Float'Digits); RstF : constant Flt := Flt (Rst'Pos (Rst'First)); RstL : constant Flt := Flt (Rst'Pos (Rst'Last)); Offs : constant Flt := RstF - 0.5; K1 : constant := 94_833_359; K1F : constant := 94_833_359.0; K2 : constant := 47_416_679; K2F : constant := 47_416_679.0; Scal : constant Flt := (RstL - RstF + 1.0) / (K1F * K2F); type State is record X1 : Int := Int (2999 ** 2); X2 : Int := Int (1439 ** 2); P : Int := K1; Q : Int := K2; FP : Flt := K1F; Scl : Flt := Scal; end record; type Writable_Access (Self : access Generator) is limited null record; -- Auxiliary type to make Generator a self-referential type type Generator is limited record Writable : Writable_Access (Generator'Access); -- This self reference allows functions to modify Generator arguments Gen_State : State; end record; end GNAT.MBBS_Discrete_Random;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . A T O M I C _ C O U N T E R S -- -- -- -- B o d y -- -- -- -- Copyright (C) 2011-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. -- -- -- ------------------------------------------------------------------------------ -- This is version of the package, for use on platforms where this capability -- is not supported. All Atomic_Counter operations raises Program_Error, -- Atomic_Unsigned operations processed in non-atomic manner. package body System.Atomic_Counters is --------------- -- Decrement -- --------------- function Decrement (Item : in out Atomic_Counter) return Boolean is begin raise Program_Error; return False; end Decrement; function Decrement (Item : aliased in out Atomic_Unsigned) return Boolean is begin -- Could not use Item := Item - 1; because it is disabled in spec. Item := Atomic_Unsigned'Pred (Item); return Item = 0; end Decrement; procedure Decrement (Item : aliased in out Atomic_Unsigned) is begin Item := Atomic_Unsigned'Pred (Item); end Decrement; --------------- -- Increment -- --------------- procedure Increment (Item : in out Atomic_Counter) is begin raise Program_Error; end Increment; procedure Increment (Item : aliased in out Atomic_Unsigned) is begin Item := Atomic_Unsigned'Succ (Item); end Increment; ---------------- -- Initialize -- ---------------- procedure Initialize (Item : out Atomic_Counter) is begin raise Program_Error; end Initialize; ------------ -- Is_One -- ------------ function Is_One (Item : Atomic_Counter) return Boolean is begin raise Program_Error; return False; end Is_One; end System.Atomic_Counters;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . E X P _ L L U -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2005 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, 51 Franklin Street, Fifth Floor, -- -- Boston, MA 02110-1301, USA. -- -- -- -- -- -- -- -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ -- This procedure performs exponentiation of unsigned types (with binary -- modulus values exceeding that of Unsigned_Types.Unsigned). The result -- is always full width, the caller must do a masking operation if the -- modulus is less than 2 ** (Long_Long_Unsigned'Size). with System.Unsigned_Types; package System.Exp_LLU is pragma Pure; function Exp_Long_Long_Unsigned (Left : System.Unsigned_Types.Long_Long_Unsigned; Right : Natural) return System.Unsigned_Types.Long_Long_Unsigned; end System.Exp_LLU;
------------------------------------------------------------------------------ -- -- -- GNAT LIBRARY COMPONENTS -- -- -- -- ADA.CONTAINERS.UNBOUNDED_SYNCHRONIZED_QUEUES -- -- -- -- S p e c -- -- -- -- Copyright (C) 2011-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 System; with Ada.Containers.Synchronized_Queue_Interfaces; with Ada.Finalization; generic with package Queue_Interfaces is new Ada.Containers.Synchronized_Queue_Interfaces (<>); Default_Ceiling : System.Any_Priority := System.Priority'Last; package Ada.Containers.Unbounded_Synchronized_Queues is pragma Annotate (CodePeer, Skip_Analysis); pragma Preelaborate; package Implementation is -- All identifiers in this unit are implementation defined pragma Implementation_Defined; type List_Type is tagged limited private; procedure Enqueue (List : in out List_Type; New_Item : Queue_Interfaces.Element_Type); procedure Dequeue (List : in out List_Type; Element : out Queue_Interfaces.Element_Type); function Length (List : List_Type) return Count_Type; function Max_Length (List : List_Type) return Count_Type; private type Node_Type; type Node_Access is access Node_Type; type Node_Type is limited record Element : Queue_Interfaces.Element_Type; Next : Node_Access; end record; type List_Type is new Ada.Finalization.Limited_Controlled with record First, Last : Node_Access; Length : Count_Type := 0; Max_Length : Count_Type := 0; end record; overriding procedure Finalize (List : in out List_Type); end Implementation; protected type Queue (Ceiling : System.Any_Priority := Default_Ceiling) with Priority => Ceiling is new Queue_Interfaces.Queue with overriding entry Enqueue (New_Item : Queue_Interfaces.Element_Type); overriding entry Dequeue (Element : out Queue_Interfaces.Element_Type); overriding function Current_Use return Count_Type; overriding function Peak_Use return Count_Type; private List : Implementation.List_Type; end Queue; end Ada.Containers.Unbounded_Synchronized_Queues;
package LR.Synchro.serveur is function Nom_Strategie return String; procedure Demander_Lecture; procedure Demander_Ecriture; procedure Terminer_Lecture; procedure Terminer_Ecriture; end LR.Synchro.serveur;
-- This spec has been automatically generated from STM32F103.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.ETHERNET is pragma Preelaborate; --------------- -- Registers -- --------------- subtype DMABMR_DSL_Field is HAL.UInt5; subtype DMABMR_PBL_Field is HAL.UInt6; subtype DMABMR_RTPR_Field is HAL.UInt2; subtype DMABMR_RDP_Field is HAL.UInt6; -- Ethernet DMA bus mode register type DMABMR_Register is record -- Software reset SR : Boolean := True; -- DMA Arbitration DA : Boolean := False; -- Descriptor skip length DSL : DMABMR_DSL_Field := 16#0#; -- unspecified Reserved_7_7 : HAL.Bit := 16#0#; -- Programmable burst length PBL : DMABMR_PBL_Field := 16#1#; -- Rx Tx priority ratio RTPR : DMABMR_RTPR_Field := 16#0#; -- Fixed burst FB : Boolean := False; -- Rx DMA PBL RDP : DMABMR_RDP_Field := 16#1#; -- Use separate PBL USP : Boolean := False; -- 4xPBL mode FPM : Boolean := False; -- Address-aligned beats AAB : Boolean := False; -- unspecified Reserved_26_31 : HAL.UInt6 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMABMR_Register use record SR at 0 range 0 .. 0; DA at 0 range 1 .. 1; DSL at 0 range 2 .. 6; Reserved_7_7 at 0 range 7 .. 7; PBL at 0 range 8 .. 13; RTPR at 0 range 14 .. 15; FB at 0 range 16 .. 16; RDP at 0 range 17 .. 22; USP at 0 range 23 .. 23; FPM at 0 range 24 .. 24; AAB at 0 range 25 .. 25; Reserved_26_31 at 0 range 26 .. 31; end record; subtype DMASR_RPS_Field is HAL.UInt3; subtype DMASR_TPS_Field is HAL.UInt3; subtype DMASR_EBS_Field is HAL.UInt3; -- Ethernet DMA status register type DMASR_Register is record -- Transmit status TS : Boolean := False; -- Transmit process stopped status TPSS : Boolean := False; -- Transmit buffer unavailable status TBUS : Boolean := False; -- Transmit jabber timeout status TJTS : Boolean := False; -- Receive overflow status ROS : Boolean := False; -- Transmit underflow status TUS : Boolean := False; -- Receive status RS : Boolean := False; -- Receive buffer unavailable status RBUS : Boolean := False; -- Receive process stopped status RPSS : Boolean := False; -- Receive watchdog timeout status PWTS : Boolean := False; -- Early transmit status ETS : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- Fatal bus error status FBES : Boolean := False; -- Early receive status ERS : Boolean := False; -- Abnormal interrupt summary AIS : Boolean := False; -- Normal interrupt summary NIS : Boolean := False; -- Read-only. Receive process state RPS : DMASR_RPS_Field := 16#0#; -- Read-only. Transmit process state TPS : DMASR_TPS_Field := 16#0#; -- Read-only. Error bits status EBS : DMASR_EBS_Field := 16#0#; -- unspecified Reserved_26_26 : HAL.Bit := 16#0#; -- Read-only. MMC status MMCS : Boolean := False; -- Read-only. PMT status PMTS : Boolean := False; -- Read-only. Time stamp trigger status TSTS : Boolean := False; -- unspecified Reserved_30_31 : HAL.UInt2 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMASR_Register use record TS at 0 range 0 .. 0; TPSS at 0 range 1 .. 1; TBUS at 0 range 2 .. 2; TJTS at 0 range 3 .. 3; ROS at 0 range 4 .. 4; TUS at 0 range 5 .. 5; RS at 0 range 6 .. 6; RBUS at 0 range 7 .. 7; RPSS at 0 range 8 .. 8; PWTS at 0 range 9 .. 9; ETS at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBES at 0 range 13 .. 13; ERS at 0 range 14 .. 14; AIS at 0 range 15 .. 15; NIS at 0 range 16 .. 16; RPS at 0 range 17 .. 19; TPS at 0 range 20 .. 22; EBS at 0 range 23 .. 25; Reserved_26_26 at 0 range 26 .. 26; MMCS at 0 range 27 .. 27; PMTS at 0 range 28 .. 28; TSTS at 0 range 29 .. 29; Reserved_30_31 at 0 range 30 .. 31; end record; subtype DMAOMR_RTC_Field is HAL.UInt2; subtype DMAOMR_TTC_Field is HAL.UInt3; -- Ethernet DMA operation mode register type DMAOMR_Register is record -- unspecified Reserved_0_0 : HAL.Bit := 16#0#; -- SR SR : Boolean := False; -- OSF OSF : Boolean := False; -- RTC RTC : DMAOMR_RTC_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- FUGF FUGF : Boolean := False; -- FEF FEF : Boolean := False; -- unspecified Reserved_8_12 : HAL.UInt5 := 16#0#; -- ST ST : Boolean := False; -- TTC TTC : DMAOMR_TTC_Field := 16#0#; -- unspecified Reserved_17_19 : HAL.UInt3 := 16#0#; -- FTF FTF : Boolean := False; -- TSF TSF : Boolean := False; -- unspecified Reserved_22_23 : HAL.UInt2 := 16#0#; -- DFRF DFRF : Boolean := False; -- RSF RSF : Boolean := False; -- DTCEFD DTCEFD : Boolean := False; -- unspecified Reserved_27_31 : HAL.UInt5 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAOMR_Register use record Reserved_0_0 at 0 range 0 .. 0; SR at 0 range 1 .. 1; OSF at 0 range 2 .. 2; RTC at 0 range 3 .. 4; Reserved_5_5 at 0 range 5 .. 5; FUGF at 0 range 6 .. 6; FEF at 0 range 7 .. 7; Reserved_8_12 at 0 range 8 .. 12; ST at 0 range 13 .. 13; TTC at 0 range 14 .. 16; Reserved_17_19 at 0 range 17 .. 19; FTF at 0 range 20 .. 20; TSF at 0 range 21 .. 21; Reserved_22_23 at 0 range 22 .. 23; DFRF at 0 range 24 .. 24; RSF at 0 range 25 .. 25; DTCEFD at 0 range 26 .. 26; Reserved_27_31 at 0 range 27 .. 31; end record; -- Ethernet DMA interrupt enable register type DMAIER_Register is record -- Transmit interrupt enable TIE : Boolean := False; -- Transmit process stopped interrupt enable TPSIE : Boolean := False; -- Transmit buffer unavailable interrupt enable TBUIE : Boolean := False; -- Transmit jabber timeout interrupt enable TJTIE : Boolean := False; -- Overflow interrupt enable ROIE : Boolean := False; -- Underflow interrupt enable TUIE : Boolean := False; -- Receive interrupt enable RIE : Boolean := False; -- Receive buffer unavailable interrupt enable RBUIE : Boolean := False; -- Receive process stopped interrupt enable RPSIE : Boolean := False; -- receive watchdog timeout interrupt enable RWTIE : Boolean := False; -- Early transmit interrupt enable ETIE : Boolean := False; -- unspecified Reserved_11_12 : HAL.UInt2 := 16#0#; -- Fatal bus error interrupt enable FBEIE : Boolean := False; -- Early receive interrupt enable ERIE : Boolean := False; -- Abnormal interrupt summary enable AISE : Boolean := False; -- Normal interrupt summary enable NISE : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAIER_Register use record TIE at 0 range 0 .. 0; TPSIE at 0 range 1 .. 1; TBUIE at 0 range 2 .. 2; TJTIE at 0 range 3 .. 3; ROIE at 0 range 4 .. 4; TUIE at 0 range 5 .. 5; RIE at 0 range 6 .. 6; RBUIE at 0 range 7 .. 7; RPSIE at 0 range 8 .. 8; RWTIE at 0 range 9 .. 9; ETIE at 0 range 10 .. 10; Reserved_11_12 at 0 range 11 .. 12; FBEIE at 0 range 13 .. 13; ERIE at 0 range 14 .. 14; AISE at 0 range 15 .. 15; NISE at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; subtype DMAMFBOCR_MFC_Field is HAL.UInt16; subtype DMAMFBOCR_MFA_Field is HAL.UInt11; -- Ethernet DMA missed frame and buffer overflow counter register type DMAMFBOCR_Register is record -- Read-only. Missed frames by the controller MFC : DMAMFBOCR_MFC_Field; -- Read-only. Overflow bit for missed frame counter OMFC : Boolean; -- Read-only. Missed frames by the application MFA : DMAMFBOCR_MFA_Field; -- Read-only. Overflow bit for FIFO overflow counter OFOC : Boolean; -- unspecified Reserved_29_31 : HAL.UInt3; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DMAMFBOCR_Register use record MFC at 0 range 0 .. 15; OMFC at 0 range 16 .. 16; MFA at 0 range 17 .. 27; OFOC at 0 range 28 .. 28; Reserved_29_31 at 0 range 29 .. 31; end record; subtype MACCR_BL_Field is HAL.UInt2; subtype MACCR_IFG_Field is HAL.UInt3; -- Ethernet MAC configuration register (ETH_MACCR) type MACCR_Register is record -- unspecified Reserved_0_1 : HAL.UInt2 := 16#0#; -- Receiver enable RE : Boolean := False; -- Transmitter enable TE : Boolean := False; -- Deferral check DC : Boolean := False; -- Back-off limit BL : MACCR_BL_Field := 16#0#; -- Automatic pad/CRC stripping APCS : Boolean := False; -- unspecified Reserved_8_8 : HAL.Bit := 16#0#; -- Retry disable RD : Boolean := False; -- IPv4 checksum offload IPCO : Boolean := False; -- Duplex mode DM : Boolean := False; -- Loopback mode LM : Boolean := False; -- Receive own disable ROD : Boolean := False; -- Fast Ethernet speed FES : Boolean := False; -- unspecified Reserved_15_15 : HAL.Bit := 16#1#; -- Carrier sense disable CSD : Boolean := False; -- Interframe gap IFG : MACCR_IFG_Field := 16#0#; -- unspecified Reserved_20_21 : HAL.UInt2 := 16#0#; -- Jabber disable JD : Boolean := False; -- Watchdog disable WD : Boolean := False; -- unspecified Reserved_24_31 : HAL.UInt8 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACCR_Register use record Reserved_0_1 at 0 range 0 .. 1; RE at 0 range 2 .. 2; TE at 0 range 3 .. 3; DC at 0 range 4 .. 4; BL at 0 range 5 .. 6; APCS at 0 range 7 .. 7; Reserved_8_8 at 0 range 8 .. 8; RD at 0 range 9 .. 9; IPCO at 0 range 10 .. 10; DM at 0 range 11 .. 11; LM at 0 range 12 .. 12; ROD at 0 range 13 .. 13; FES at 0 range 14 .. 14; Reserved_15_15 at 0 range 15 .. 15; CSD at 0 range 16 .. 16; IFG at 0 range 17 .. 19; Reserved_20_21 at 0 range 20 .. 21; JD at 0 range 22 .. 22; WD at 0 range 23 .. 23; Reserved_24_31 at 0 range 24 .. 31; end record; subtype MACFFR_PCF_Field is HAL.UInt2; -- Ethernet MAC frame filter register (ETH_MACCFFR) type MACFFR_Register is record -- Promiscuous mode PM : Boolean := False; -- Hash unicast HU : Boolean := False; -- Hash multicast HM : Boolean := False; -- Destination address inverse filtering DAIF : Boolean := False; -- Pass all multicast PAM : Boolean := False; -- Broadcast frames disable BFD : Boolean := False; -- Pass control frames PCF : MACFFR_PCF_Field := 16#0#; -- Source address inverse filtering SAIF : Boolean := False; -- Source address filter SAF : Boolean := False; -- Hash or perfect filter HPF : Boolean := False; -- unspecified Reserved_11_30 : HAL.UInt20 := 16#0#; -- Receive all RA : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFFR_Register use record PM at 0 range 0 .. 0; HU at 0 range 1 .. 1; HM at 0 range 2 .. 2; DAIF at 0 range 3 .. 3; PAM at 0 range 4 .. 4; BFD at 0 range 5 .. 5; PCF at 0 range 6 .. 7; SAIF at 0 range 8 .. 8; SAF at 0 range 9 .. 9; HPF at 0 range 10 .. 10; Reserved_11_30 at 0 range 11 .. 30; RA at 0 range 31 .. 31; end record; subtype MACMIIAR_CR_Field is HAL.UInt3; subtype MACMIIAR_MR_Field is HAL.UInt5; subtype MACMIIAR_PA_Field is HAL.UInt5; -- Ethernet MAC MII address register (ETH_MACMIIAR) type MACMIIAR_Register is record -- MII busy MB : Boolean := False; -- MII write MW : Boolean := False; -- Clock range CR : MACMIIAR_CR_Field := 16#0#; -- unspecified Reserved_5_5 : HAL.Bit := 16#0#; -- MII register MR : MACMIIAR_MR_Field := 16#0#; -- PHY address PA : MACMIIAR_PA_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 MACMIIAR_Register use record MB at 0 range 0 .. 0; MW at 0 range 1 .. 1; CR at 0 range 2 .. 4; Reserved_5_5 at 0 range 5 .. 5; MR at 0 range 6 .. 10; PA at 0 range 11 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MACMIIDR_MD_Field is HAL.UInt16; -- Ethernet MAC MII data register (ETH_MACMIIDR) type MACMIIDR_Register is record -- MII data MD : MACMIIDR_MD_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 MACMIIDR_Register use record MD at 0 range 0 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype MACFCR_PLT_Field is HAL.UInt2; subtype MACFCR_PT_Field is HAL.UInt16; -- Ethernet MAC flow control register (ETH_MACFCR) type MACFCR_Register is record -- Flow control busy/back pressure activate FCB_BPA : Boolean := False; -- Transmit flow control enable TFCE : Boolean := False; -- Receive flow control enable RFCE : Boolean := False; -- Unicast pause frame detect UPFD : Boolean := False; -- Pause low threshold PLT : MACFCR_PLT_Field := 16#0#; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- Zero-quanta pause disable ZQPD : Boolean := False; -- unspecified Reserved_8_15 : HAL.UInt8 := 16#0#; -- Pass control frames PT : MACFCR_PT_Field := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACFCR_Register use record FCB_BPA at 0 range 0 .. 0; TFCE at 0 range 1 .. 1; RFCE at 0 range 2 .. 2; UPFD at 0 range 3 .. 3; PLT at 0 range 4 .. 5; Reserved_6_6 at 0 range 6 .. 6; ZQPD at 0 range 7 .. 7; Reserved_8_15 at 0 range 8 .. 15; PT at 0 range 16 .. 31; end record; subtype MACVLANTR_VLANTI_Field is HAL.UInt16; -- Ethernet MAC VLAN tag register (ETH_MACVLANTR) type MACVLANTR_Register is record -- VLAN tag identifier (for receive frames) VLANTI : MACVLANTR_VLANTI_Field := 16#0#; -- 12-bit VLAN tag comparison VLANTC : Boolean := False; -- unspecified Reserved_17_31 : HAL.UInt15 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACVLANTR_Register use record VLANTI at 0 range 0 .. 15; VLANTC at 0 range 16 .. 16; Reserved_17_31 at 0 range 17 .. 31; end record; -- Ethernet MAC PMT control and status register (ETH_MACPMTCSR) type MACPMTCSR_Register is record -- Power down PD : Boolean := False; -- Magic Packet enable MPE : Boolean := False; -- Wakeup frame enable WFE : Boolean := False; -- unspecified Reserved_3_4 : HAL.UInt2 := 16#0#; -- Magic packet received MPR : Boolean := False; -- Wakeup frame received WFR : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- Global unicast GU : Boolean := False; -- unspecified Reserved_10_30 : HAL.UInt21 := 16#0#; -- Wakeup frame filter register pointer reset WFFRPR : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACPMTCSR_Register use record PD at 0 range 0 .. 0; MPE at 0 range 1 .. 1; WFE at 0 range 2 .. 2; Reserved_3_4 at 0 range 3 .. 4; MPR at 0 range 5 .. 5; WFR at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; GU at 0 range 9 .. 9; Reserved_10_30 at 0 range 10 .. 30; WFFRPR at 0 range 31 .. 31; end record; -- Ethernet MAC interrupt status register (ETH_MACSR) type MACSR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- PMT status PMTS : Boolean := False; -- MMC status MMCS : Boolean := False; -- MMC receive status MMCRS : Boolean := False; -- MMC transmit status MMCTS : Boolean := False; -- unspecified Reserved_7_8 : HAL.UInt2 := 16#0#; -- Time stamp trigger status TSTS : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACSR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTS at 0 range 3 .. 3; MMCS at 0 range 4 .. 4; MMCRS at 0 range 5 .. 5; MMCTS at 0 range 6 .. 6; Reserved_7_8 at 0 range 7 .. 8; TSTS at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- Ethernet MAC interrupt mask register (ETH_MACIMR) type MACIMR_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- PMT interrupt mask PMTIM : Boolean := False; -- unspecified Reserved_4_8 : HAL.UInt5 := 16#0#; -- Time stamp trigger interrupt mask TSTIM : Boolean := False; -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACIMR_Register use record Reserved_0_2 at 0 range 0 .. 2; PMTIM at 0 range 3 .. 3; Reserved_4_8 at 0 range 4 .. 8; TSTIM at 0 range 9 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; subtype MACA0HR_MACA0H_Field is HAL.UInt16; -- Ethernet MAC address 0 high register (ETH_MACA0HR) type MACA0HR_Register is record -- MAC address0 high MACA0H : MACA0HR_MACA0H_Field := 16#FFFF#; -- unspecified Reserved_16_30 : HAL.UInt15 := 16#10#; -- Read-only. Always 1 MO : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA0HR_Register use record MACA0H at 0 range 0 .. 15; Reserved_16_30 at 0 range 16 .. 30; MO at 0 range 31 .. 31; end record; subtype MACA1HR_MACA1H_Field is HAL.UInt16; subtype MACA1HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 1 high register (ETH_MACA1HR) type MACA1HR_Register is record -- MAC address1 high MACA1H : MACA1HR_MACA1H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- Mask byte control MBC : MACA1HR_MBC_Field := 16#0#; -- Source address SA : Boolean := False; -- Address enable AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA1HR_Register use record MACA1H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; subtype MACA2HR_ETH_MACA2HR_Field is HAL.UInt16; subtype MACA2HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 2 high register (ETH_MACA2HR) type MACA2HR_Register is record -- Ethernet MAC address 2 high register ETH_MACA2HR : MACA2HR_ETH_MACA2HR_Field := 16#50#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- Mask byte control MBC : MACA2HR_MBC_Field := 16#0#; -- Source address SA : Boolean := False; -- Address enable AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2HR_Register use record ETH_MACA2HR at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; subtype MACA2LR_MACA2L_Field is HAL.UInt31; -- Ethernet MAC address 2 low register type MACA2LR_Register is record -- MAC address2 low MACA2L : MACA2LR_MACA2L_Field := 16#7FFFFFFF#; -- unspecified Reserved_31_31 : HAL.Bit := 16#1#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA2LR_Register use record MACA2L at 0 range 0 .. 30; Reserved_31_31 at 0 range 31 .. 31; end record; subtype MACA3HR_MACA3H_Field is HAL.UInt16; subtype MACA3HR_MBC_Field is HAL.UInt6; -- Ethernet MAC address 3 high register (ETH_MACA3HR) type MACA3HR_Register is record -- MAC address3 high MACA3H : MACA3HR_MACA3H_Field := 16#FFFF#; -- unspecified Reserved_16_23 : HAL.UInt8 := 16#0#; -- Mask byte control MBC : MACA3HR_MBC_Field := 16#0#; -- Source address SA : Boolean := False; -- Address enable AE : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MACA3HR_Register use record MACA3H at 0 range 0 .. 15; Reserved_16_23 at 0 range 16 .. 23; MBC at 0 range 24 .. 29; SA at 0 range 30 .. 30; AE at 0 range 31 .. 31; end record; -- Ethernet MMC control register (ETH_MMCCR) type MMCCR_Register is record -- Counter reset CR : Boolean := False; -- Counter stop rollover CSR : Boolean := False; -- Reset on read ROR : Boolean := False; -- unspecified Reserved_3_30 : HAL.UInt28 := 16#0#; -- MMC counter freeze MCF : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCCR_Register use record CR at 0 range 0 .. 0; CSR at 0 range 1 .. 1; ROR at 0 range 2 .. 2; Reserved_3_30 at 0 range 3 .. 30; MCF at 0 range 31 .. 31; end record; -- Ethernet MMC receive interrupt register (ETH_MMCRIR) type MMCRIR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- Received frames CRC error status RFCES : Boolean := False; -- Received frames alignment error status RFAES : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- Received Good Unicast Frames Status RGUFS : 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 MMCRIR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCES at 0 range 5 .. 5; RFAES at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFS at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Ethernet MMC transmit interrupt register (ETH_MMCTIR) type MMCTIR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14 := 16#0#; -- Transmitted good frames single collision status TGFSCS : Boolean := False; -- Transmitted good frames more single collision status TGFMSCS : Boolean := False; -- unspecified Reserved_16_20 : HAL.UInt5 := 16#0#; -- Transmitted good frames status TGFS : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCS at 0 range 14 .. 14; TGFMSCS at 0 range 15 .. 15; Reserved_16_20 at 0 range 16 .. 20; TGFS at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- Ethernet MMC receive interrupt mask register (ETH_MMCRIMR) type MMCRIMR_Register is record -- unspecified Reserved_0_4 : HAL.UInt5 := 16#0#; -- Received frame CRC error mask RFCEM : Boolean := False; -- Received frames alignment error mask RFAEM : Boolean := False; -- unspecified Reserved_7_16 : HAL.UInt10 := 16#0#; -- Received good unicast frames mask RGUFM : 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 MMCRIMR_Register use record Reserved_0_4 at 0 range 0 .. 4; RFCEM at 0 range 5 .. 5; RFAEM at 0 range 6 .. 6; Reserved_7_16 at 0 range 7 .. 16; RGUFM at 0 range 17 .. 17; Reserved_18_31 at 0 range 18 .. 31; end record; -- Ethernet MMC transmit interrupt mask register (ETH_MMCTIMR) type MMCTIMR_Register is record -- unspecified Reserved_0_13 : HAL.UInt14 := 16#0#; -- Transmitted good frames single collision mask TGFSCM : Boolean := False; -- Transmitted good frames more single collision mask TGFMSCM : Boolean := False; -- unspecified Reserved_16_20 : HAL.UInt5 := 16#0#; -- Transmitted good frames mask TGFM : Boolean := False; -- unspecified Reserved_22_31 : HAL.UInt10 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for MMCTIMR_Register use record Reserved_0_13 at 0 range 0 .. 13; TGFSCM at 0 range 14 .. 14; TGFMSCM at 0 range 15 .. 15; Reserved_16_20 at 0 range 16 .. 20; TGFM at 0 range 21 .. 21; Reserved_22_31 at 0 range 22 .. 31; end record; -- Ethernet PTP time stamp control register (ETH_PTPTSCR) type PTPTSCR_Register is record -- Time stamp enable TSE : Boolean := False; -- Time stamp fine or coarse update TSFCU : Boolean := False; -- Time stamp system time initialize TSSTI : Boolean := False; -- Time stamp system time update TSSTU : Boolean := False; -- Time stamp interrupt trigger enable TSITE : Boolean := False; -- Time stamp addend register update TSARU : Boolean := False; -- unspecified Reserved_6_31 : HAL.UInt26 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSCR_Register use record TSE at 0 range 0 .. 0; TSFCU at 0 range 1 .. 1; TSSTI at 0 range 2 .. 2; TSSTU at 0 range 3 .. 3; TSITE at 0 range 4 .. 4; TSARU at 0 range 5 .. 5; Reserved_6_31 at 0 range 6 .. 31; end record; subtype PTPSSIR_STSSI_Field is HAL.UInt8; -- Ethernet PTP subsecond increment register type PTPSSIR_Register is record -- System time subsecond increment STSSI : PTPSSIR_STSSI_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 PTPSSIR_Register use record STSSI at 0 range 0 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype PTPTSLR_STSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low register (ETH_PTPTSLR) type PTPTSLR_Register is record -- Read-only. System time subseconds STSS : PTPTSLR_STSS_Field; -- Read-only. System time positive or negative sign STPNS : Boolean; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLR_Register use record STSS at 0 range 0 .. 30; STPNS at 0 range 31 .. 31; end record; subtype PTPTSLUR_TSUSS_Field is HAL.UInt31; -- Ethernet PTP time stamp low update register (ETH_PTPTSLUR) type PTPTSLUR_Register is record -- Time stamp update subseconds TSUSS : PTPTSLUR_TSUSS_Field := 16#0#; -- Time stamp update positive or negative sign TSUPNS : Boolean := False; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for PTPTSLUR_Register use record TSUSS at 0 range 0 .. 30; TSUPNS at 0 range 31 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Ethernet: DMA controller operation type ETHERNET_DMA_Peripheral is record -- Ethernet DMA bus mode register DMABMR : aliased DMABMR_Register; -- Ethernet DMA transmit poll demand register DMATPDR : aliased HAL.UInt32; -- EHERNET DMA receive poll demand register DMARPDR : aliased HAL.UInt32; -- Ethernet DMA receive descriptor list address register DMARDLAR : aliased HAL.UInt32; -- Ethernet DMA transmit descriptor list address register DMATDLAR : aliased HAL.UInt32; -- Ethernet DMA status register DMASR : aliased DMASR_Register; -- Ethernet DMA operation mode register DMAOMR : aliased DMAOMR_Register; -- Ethernet DMA interrupt enable register DMAIER : aliased DMAIER_Register; -- Ethernet DMA missed frame and buffer overflow counter register DMAMFBOCR : aliased DMAMFBOCR_Register; -- Ethernet DMA current host transmit descriptor register DMACHTDR : aliased HAL.UInt32; -- Ethernet DMA current host receive descriptor register DMACHRDR : aliased HAL.UInt32; -- Ethernet DMA current host transmit buffer address register DMACHTBAR : aliased HAL.UInt32; -- Ethernet DMA current host receive buffer address register DMACHRBAR : aliased HAL.UInt32; end record with Volatile; for ETHERNET_DMA_Peripheral use record DMABMR at 16#0# range 0 .. 31; DMATPDR at 16#4# range 0 .. 31; DMARPDR at 16#8# range 0 .. 31; DMARDLAR at 16#C# range 0 .. 31; DMATDLAR at 16#10# range 0 .. 31; DMASR at 16#14# range 0 .. 31; DMAOMR at 16#18# range 0 .. 31; DMAIER at 16#1C# range 0 .. 31; DMAMFBOCR at 16#20# range 0 .. 31; DMACHTDR at 16#48# range 0 .. 31; DMACHRDR at 16#4C# range 0 .. 31; DMACHTBAR at 16#50# range 0 .. 31; DMACHRBAR at 16#54# range 0 .. 31; end record; -- Ethernet: DMA controller operation ETHERNET_DMA_Periph : aliased ETHERNET_DMA_Peripheral with Import, Address => System'To_Address (16#40029000#); -- Ethernet: media access control type ETHERNET_MAC_Peripheral is record -- Ethernet MAC configuration register (ETH_MACCR) MACCR : aliased MACCR_Register; -- Ethernet MAC frame filter register (ETH_MACCFFR) MACFFR : aliased MACFFR_Register; -- Ethernet MAC hash table high register MACHTHR : aliased HAL.UInt32; -- Ethernet MAC hash table low register MACHTLR : aliased HAL.UInt32; -- Ethernet MAC MII address register (ETH_MACMIIAR) MACMIIAR : aliased MACMIIAR_Register; -- Ethernet MAC MII data register (ETH_MACMIIDR) MACMIIDR : aliased MACMIIDR_Register; -- Ethernet MAC flow control register (ETH_MACFCR) MACFCR : aliased MACFCR_Register; -- Ethernet MAC VLAN tag register (ETH_MACVLANTR) MACVLANTR : aliased MACVLANTR_Register; -- Ethernet MAC remote wakeup frame filter register (ETH_MACRWUFFR) MACRWUFFR : aliased HAL.UInt32; -- Ethernet MAC PMT control and status register (ETH_MACPMTCSR) MACPMTCSR : aliased MACPMTCSR_Register; -- Ethernet MAC interrupt status register (ETH_MACSR) MACSR : aliased MACSR_Register; -- Ethernet MAC interrupt mask register (ETH_MACIMR) MACIMR : aliased MACIMR_Register; -- Ethernet MAC address 0 high register (ETH_MACA0HR) MACA0HR : aliased MACA0HR_Register; -- Ethernet MAC address 0 low register MACA0LR : aliased HAL.UInt32; -- Ethernet MAC address 1 high register (ETH_MACA1HR) MACA1HR : aliased MACA1HR_Register; -- Ethernet MAC address1 low register MACA1LR : aliased HAL.UInt32; -- Ethernet MAC address 2 high register (ETH_MACA2HR) MACA2HR : aliased MACA2HR_Register; -- Ethernet MAC address 2 low register MACA2LR : aliased MACA2LR_Register; -- Ethernet MAC address 3 high register (ETH_MACA3HR) MACA3HR : aliased MACA3HR_Register; -- Ethernet MAC address 3 low register MACA3LR : aliased HAL.UInt32; end record with Volatile; for ETHERNET_MAC_Peripheral use record MACCR at 16#0# range 0 .. 31; MACFFR at 16#4# range 0 .. 31; MACHTHR at 16#8# range 0 .. 31; MACHTLR at 16#C# range 0 .. 31; MACMIIAR at 16#10# range 0 .. 31; MACMIIDR at 16#14# range 0 .. 31; MACFCR at 16#18# range 0 .. 31; MACVLANTR at 16#1C# range 0 .. 31; MACRWUFFR at 16#28# range 0 .. 31; MACPMTCSR at 16#2C# range 0 .. 31; MACSR at 16#38# range 0 .. 31; MACIMR at 16#3C# range 0 .. 31; MACA0HR at 16#40# range 0 .. 31; MACA0LR at 16#44# range 0 .. 31; MACA1HR at 16#48# range 0 .. 31; MACA1LR at 16#4C# range 0 .. 31; MACA2HR at 16#50# range 0 .. 31; MACA2LR at 16#54# range 0 .. 31; MACA3HR at 16#58# range 0 .. 31; MACA3LR at 16#5C# range 0 .. 31; end record; -- Ethernet: media access control ETHERNET_MAC_Periph : aliased ETHERNET_MAC_Peripheral with Import, Address => System'To_Address (16#40028000#); -- Ethernet: MAC management counters type ETHERNET_MMC_Peripheral is record -- Ethernet MMC control register (ETH_MMCCR) MMCCR : aliased MMCCR_Register; -- Ethernet MMC receive interrupt register (ETH_MMCRIR) MMCRIR : aliased MMCRIR_Register; -- Ethernet MMC transmit interrupt register (ETH_MMCTIR) MMCTIR : aliased MMCTIR_Register; -- Ethernet MMC receive interrupt mask register (ETH_MMCRIMR) MMCRIMR : aliased MMCRIMR_Register; -- Ethernet MMC transmit interrupt mask register (ETH_MMCTIMR) MMCTIMR : aliased MMCTIMR_Register; -- Ethernet MMC transmitted good frames after a single collision counter MMCTGFSCCR : aliased HAL.UInt32; -- Ethernet MMC transmitted good frames after more than a single -- collision MMCTGFMSCCR : aliased HAL.UInt32; -- Ethernet MMC transmitted good frames counter register MMCTGFCR : aliased HAL.UInt32; -- Ethernet MMC received frames with CRC error counter register MMCRFCECR : aliased HAL.UInt32; -- Ethernet MMC received frames with alignment error counter register MMCRFAECR : aliased HAL.UInt32; -- MMC received good unicast frames counter register MMCRGUFCR : aliased HAL.UInt32; end record with Volatile; for ETHERNET_MMC_Peripheral use record MMCCR at 16#0# range 0 .. 31; MMCRIR at 16#4# range 0 .. 31; MMCTIR at 16#8# range 0 .. 31; MMCRIMR at 16#C# range 0 .. 31; MMCTIMR at 16#10# range 0 .. 31; MMCTGFSCCR at 16#4C# range 0 .. 31; MMCTGFMSCCR at 16#50# range 0 .. 31; MMCTGFCR at 16#68# range 0 .. 31; MMCRFCECR at 16#94# range 0 .. 31; MMCRFAECR at 16#98# range 0 .. 31; MMCRGUFCR at 16#C4# range 0 .. 31; end record; -- Ethernet: MAC management counters ETHERNET_MMC_Periph : aliased ETHERNET_MMC_Peripheral with Import, Address => System'To_Address (16#40028100#); -- Ethernet: Precision time protocol type ETHERNET_PTP_Peripheral is record -- Ethernet PTP time stamp control register (ETH_PTPTSCR) PTPTSCR : aliased PTPTSCR_Register; -- Ethernet PTP subsecond increment register PTPSSIR : aliased PTPSSIR_Register; -- Ethernet PTP time stamp high register PTPTSHR : aliased HAL.UInt32; -- Ethernet PTP time stamp low register (ETH_PTPTSLR) PTPTSLR : aliased PTPTSLR_Register; -- Ethernet PTP time stamp high update register PTPTSHUR : aliased HAL.UInt32; -- Ethernet PTP time stamp low update register (ETH_PTPTSLUR) PTPTSLUR : aliased PTPTSLUR_Register; -- Ethernet PTP time stamp addend register PTPTSAR : aliased HAL.UInt32; -- Ethernet PTP target time high register PTPTTHR : aliased HAL.UInt32; -- Ethernet PTP target time low register PTPTTLR : aliased HAL.UInt32; end record with Volatile; for ETHERNET_PTP_Peripheral use record PTPTSCR at 16#0# range 0 .. 31; PTPSSIR at 16#4# range 0 .. 31; PTPTSHR at 16#8# range 0 .. 31; PTPTSLR at 16#C# range 0 .. 31; PTPTSHUR at 16#10# range 0 .. 31; PTPTSLUR at 16#14# range 0 .. 31; PTPTSAR at 16#18# range 0 .. 31; PTPTTHR at 16#1C# range 0 .. 31; PTPTTLR at 16#20# range 0 .. 31; end record; -- Ethernet: Precision time protocol ETHERNET_PTP_Periph : aliased ETHERNET_PTP_Peripheral with Import, Address => System'To_Address (16#40028700#); end STM32_SVD.ETHERNET;
------------------------------------------------------------------------------ -- -- -- J E W L . C A N V A S _ I M P L E M E N T A T I O N -- -- -- -- This is a private package containing the internal implementation -- -- details of the canvases, as defined in JEWL.Windows. -- -- -- -- Copyright (C) John English 2000. Contact address: je@brighton.ac.uk -- -- This software is released under the terms of the GNU General Public -- -- License and is intended primarily for educational use. Please contact -- -- the author to report bugs, suggestions and modifications. -- -- -- ------------------------------------------------------------------------------ -- $Id: jewl-canvas_implementation.ads 1.7 2007/01/08 17:00:00 JE Exp $ ------------------------------------------------------------------------------ -- -- $Log: jewl-canvas_implementation.ads $ -- Revision 1.7 2007/01/08 17:00:00 JE -- * Fixed linker options in JEWL.Win32_Interface to accommodate changes to GNAT -- GPL 2006 compiler (thanks to John McCormick for this) -- * Added delay in message loop to avoid the appearance of hogging 100% of CPU -- time -- -- Revision 1.6 2001/11/02 16:00:00 JE -- * Fixed canvas bug when saving an empty canvas -- * Restore with no prior save now acts as erase -- * Removed redundant variable declaration in Image function -- -- Revision 1.5 2001/08/22 15:00:00 JE -- * Minor bugfix to Get_Text for combo boxes -- * Minor changes to documentation (including new example involving dialogs) -- -- Revision 1.4 2001/01/25 09:00:00 je -- Changes visible to the user: -- -- * Added support for drawing bitmaps on canvases (Draw_Image operations -- and new type Image_Type) -- * Added Play_Sound -- * Added several new operations on all windows: Get_Origin, Get_Width, -- Get_Height, Set_Origin, Set_Size and Focus -- * Added several functions giving screen and window dimensions: Screen_Width, -- Screen_Height, Frame_Width, Frame_Height, Dialog_Width, Dialog_Height and -- Menu_Height -- * Canvases can now handle keyboard events: new constructor and Key_Code added -- * Added procedure Play_Sound -- * Operations "+" and "-" added for Point_Type -- * Pens can now be zero pixels wide -- * The absolute origin of a frame can now have be specified when the frame -- is created -- * Added new File_Dialog operations Add_Filter and Set_Directory -- * Added Get_Line renames to JEWL.IO for compatibility with Ada.Text_IO -- * Added all the Get(File,Item) operations mentioned in documentation but -- unaccountably missing :-( -- * Documentation updated to reflect the above changes -- * HTML versions of public package specifications added with links from -- main documentation pages -- -- Other internal changes: -- -- * Canvas fonts, pens etc. now use JEWL.Reference_Counted_Type rather than -- reinventing this particular wheel, as do images -- * Various minor code formatting changes: some code reordered for clarity, -- some comments added or amended, -- * Changes introduced in 1.2 to support GNAT 3.10 have been reversed, since -- GNAT 3.10 still couldn't compile this code correctly... ;-( -- -- Outstanding issues: -- -- * Optimisation breaks the code (workaround: don't optimise) -- -- Revision 1.3 2000/07/07 12:00:00 je -- * JEWL.Simple_Windows added; JEWL.IO modified to use JEWL.Simple_Windows. -- * JEWL.IO bug fix: Put_Line to file wrote newline to standard output -- instead of to the file (thanks to Jeff Carter for pointing this out). -- * Panels fixed so that mouse clicks are passed on correctly to subwindows. -- * Memos fixed so that tabs are handled properly. -- * Password feature added to editboxes. -- * Minor typos fixed in comments within the package sources. -- * Documentation corrected and updated following comments from Moti Ben-Ari -- and Don Overheu. -- -- Revision 1.2 2000/04/18 20:00:00 je -- * Minor code changes to enable compilation by GNAT 3.10 -- * Minor documentation errors corrected -- * Some redundant "with" clauses removed -- -- Revision 1.1 2000/04/09 21:00:00 je -- Initial revision -- ------------------------------------------------------------------------------ with Ada.Finalization; with JEWL.Win32_Interface; private package JEWL.Canvas_Implementation is use JEWL.Win32_Interface; type Point_List is array (Positive range <>) of aliased Win32_POINT; ---------------------------------------------------------------------------- -- Forward declarations (defined fully later). ---------------------------------------------------------------------------- type Canvas_Object_Type; type Canvas_Object_Ptr is access Canvas_Object_Type'Class; type Image_Internals; type Image_Ptr is access all Image_Internals; ---------------------------------------------------------------------------- -- -- C A N V A S _ M O N I T O R -- -- Every canvas contains one of these protected records to synchronise -- drawing operations with accesses from the message loop task. The -- canvas stores the objects which are drawn on it as a linked list -- of drawing objects (defined in JEWL.Objects). -- -- The private data of a Canvas_Monitor is as follows: -- -- First_Object : pointer to the first object in the drawing list -- Last_Object : pointer to the last object in the drawing list -- Save_Pointer : pointer to the saved position in the drawing list -- BG_Brush : the brush used to paint the background of the canvas -- Start_X : the X position where the mouse button was pressed -- Start_Y : the Y position where the mouse button was pressed -- End_X : the most recent X position while the mouse is down -- End_Y : the most recent Y position while the mouse is down -- Button : true if the mouse is down -- Moved : true is the mouse has moved while the button is down -- Keycode : the key that was pressed (or NUL if none) -- -- The operations on a Canvas_Monitor are as follows: -- -- Clear : delete all objects in the drawing list -- Save ; save a pointer to the current end of the drawing list -- Restore : truncate the drawing list to a previously saved point -- Draw : draw all objects in the drawing list (called from the -- message loop task) -- Add : add an object to the end of the drawing list -- Set_Brush : set the background brush -- Background : get the background brush (called from the message loop -- task) -- Set_Start : set the start position when the mouse button is pressed -- (called from the message loop task) -- Get_Start : get the start position when the mouse button is pressed -- Set_End : set the current mouse position and the mouse-move flag -- (called from the message loop task) -- Get_End : get the current mouse position -- Set_Button : set the mouse button state (called from the message loop -- task) -- Mouse_Down : return the mouse button state -- Mouse_Moved : return the mouse-move flag and reset it -- Set_Key : set the keycode for a key press -- Get_Key : get and reset the current keycode -- ---------------------------------------------------------------------------- protected type Canvas_Monitor is procedure Clear; procedure Save; procedure Restore; procedure Draw (Handle : in Win32_HWND; Font : in Win32_HFONT); procedure Add (Object : in Canvas_Object_Ptr); procedure Set_Brush (Brush : in Win32_HBRUSH); function Background return Win32_HBRUSH; procedure Set_Start (X, Y : in Integer); procedure Get_Start (X, Y : out Integer); procedure Set_End (X, Y : in Integer); procedure Get_End (X, Y : out Integer); procedure Set_Button (B : in Boolean); function Mouse_Down return Boolean; function Mouse_Moved return Boolean; procedure Set_Key (C : in Character); procedure Get_Key (C : out Character); private First_Object : Canvas_Object_Ptr; Last_Object : Canvas_Object_Ptr; Save_Pointer : Canvas_Object_Ptr; BG_Brush : Win32_HBRUSH; Start_X : Integer := 0; Start_Y : Integer := 0; End_X : Integer := 0; End_Y : Integer := 0; Button : Boolean := False; Moved : Boolean := False; Keycode : Character := ASCII.NUL; end Canvas_Monitor; ---------------------------------------------------------------------------- -- -- C A N V A S _ O B J E C T _ T Y P E -- -- Canvas_Object_Type is the base type from which all drawing objects -- are derived, and Canvas_Object_Ptr is a class-wide pointer. Each -- object contains a pointer so that a singly-linked list of objects -- can be constructed. Every object must define a Draw procedure which -- draws the object on a window (which is identified by a handle to a -- Windows display context). -- ---------------------------------------------------------------------------- type Canvas_Object_Type is abstract tagged record Next : Canvas_Object_Ptr; end record; procedure Draw (Object : in out Canvas_Object_Type; Window : in Win32_HDC) is abstract; ---------------------------------------------------------------------------- -- -- Text_Type: an object type containing a text string -- type Text_Type (Length : Natural) is new Canvas_Object_Type with record Text : String (1..Length); From, To : JEWL.Point_Type; Align : Integer; end record; procedure Draw (Object : in out Text_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Line_Type: an object type which defines a line by a pair of endpoints. -- type Line_Type is new Canvas_Object_Type with record From, To : JEWL.Point_Type; end record; procedure Draw (Object : in out Line_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Rectangle_Type: an object type which defines a rectangle as a pair -- of coordinates for two opposite corners. -- type Rectangle_Type is new Canvas_Object_Type with record From, To : JEWL.Point_Type; end record; procedure Draw (Object : in out Rectangle_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Rounded_Rectangle_Type: an object type which defines a rectangle with -- rounded corners using a pair of coordinates -- for two opposite corners and a point to define -- the size of the arc used to round the corners. -- type Rounded_Rectangle_Type is new Canvas_Object_Type with record From, To, Corner : Point_Type; end record; procedure Draw (Object : in out Rounded_Rectangle_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Ellipse_Type: an object type which defines an ellipse or circle using -- a pair of coordinates for two opposite corners of the -- bounding rectangle. -- type Ellipse_Type is new Canvas_Object_Type with record From, To : JEWL.Point_Type; end record; procedure Draw (Object : in out Ellipse_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Polyline_Type: an object type which defines an open figure as a -- sequence of lines. -- type Polyline_Type (Count : Positive) is new Canvas_Object_Type with record Points : Point_List(1..Count); end record; procedure Draw (Object : in out PolyLine_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Polygon_Type: an object type which defines an open figure as a -- sequence of lines. -- type Polygon_Type (Count : Positive) is new Canvas_Object_Type with record Points : Point_List(1..Count); end record; procedure Draw (Object : in out Polygon_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Handle_Type: an object type which encapsulates a handle to a Windows -- GDI object (e.g. a pen or a brush). -- type Handle_Type is new Canvas_Object_Type with record Handle : JEWL.Controlled_Type; end record; procedure Draw (Object : in out Handle_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- Bitmap_Type: an object type representing a bitmap image. -- type Bitmap_Type is new Canvas_Object_Type with record From : JEWL.Point_Type; Width : Natural; Height : Natural; Bitmap : JEWL.Controlled_Type; end record; procedure Draw (Object : in out Bitmap_Type; Window : in Win32_HDC); ---------------------------------------------------------------------------- -- -- C O N T R O L L E D T Y P E S -- -- Each type below is a reference counted type which contains a handle to -- a Windows GDI object. The handle will be deleted automatically when the -- last object which refers to it is destroyed. -- ---------------------------------------------------------------------------- -- -- Image_Internals: used to store bitmaps in drawings -- type Image_Internals is new Reference_Counted_Type with record Image : Win32_HBITMAP; Width : Natural; Height : Natural; end record; procedure Cleanup (Object : in out Image_Internals); ---------------------------------------------------------------------------- -- -- Counted_Handle_Type: used to store pens, brushes etc. in drawings -- type Counted_Handle_Type is new JEWL.Reference_Counted_Type with record Handle : Win32_HGDIOBJ; end record; procedure Cleanup (Object : in out Counted_Handle_Type); ---------------------------------------------------------------------------- -- -- Handle: a function to create a controlled type object which contains -- a Counted_Handle_Type object. -- function Handle (Object : Win32_HGDIOBJ) return JEWL.Controlled_Type; end JEWL.Canvas_Implementation;
with Interfaces ; package body Measure_Time is use Interfaces ; function rdtsc return Unsigned_32; pragma Import (C, rdtsc, "rdtsc"); function Time ( D : Data; Iterations : in Natural) return Natural is Start, Finish : Unsigned_32; Time_Taken : Unsigned_32; begin Start := rdtsc; for I in 1..Iterations loop Procedure_To_Be_Measured(D); end loop; Finish := rdtsc; Time_Taken := Finish - Start ; return ( Natural ( Time_Taken ) ) ; end Time; end Measure_Time ;
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- S Y S T E M . P A C K _ 4 1 -- -- -- -- 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. -- -- -- ------------------------------------------------------------------------------ with System.Storage_Elements; with System.Unsigned_Types; package body System.Pack_41 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_41; 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_41 -- ------------ function Get_41 (Arr : System.Address; N : Natural; Rev_SSO : Boolean) return Bits_41 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_41; ------------ -- Set_41 -- ------------ procedure Set_41 (Arr : System.Address; N : Natural; E : Bits_41; 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_41; end System.Pack_41;
-- Copyright 2015,2017 Steven Stewart-Gallus -- -- 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 Interfaces.C.Strings; with System; with Interfaces.C.Extensions; package Libc.Stdlib.GNU with Spark_Mode => Off is pragma Preelaborate; -- arg-macro: procedure WEXITSTATUS (status) -- __WEXITSTATUS (__WAIT_INT (status)) -- arg-macro: procedure WTERMSIG (status) -- __WTERMSIG (__WAIT_INT (status)) -- arg-macro: procedure WSTOPSIG (status) -- __WSTOPSIG (__WAIT_INT (status)) -- arg-macro: procedure WIFEXITED (status) -- __WIFEXITED (__WAIT_INT (status)) -- arg-macro: procedure WIFSIGNALED (status) -- __WIFSIGNALED (__WAIT_INT (status)) -- arg-macro: procedure WIFSTOPPED (status) -- __WIFSTOPPED (__WAIT_INT (status)) -- arg-macro: procedure WIFCONTINUED (status) -- __WIFCONTINUED (__WAIT_INT (status)) -- function strtoq -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- base : int) return Long_Long_Integer; -- /usr/include/stdlib.h:195 -- pragma Import (C, strtoq, "strtoq"); function strtouq (nptr : Interfaces.C.Strings.chars_ptr; endptr : System.Address; base : int) return Extensions.unsigned_long_long; -- /usr/include/stdlib.h:200 pragma Import (C, strtouq, "strtouq"); -- function strtol_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- base : int; -- loc : Libc.xlocale_h.locale_t) return long; -- /usr/include/stdlib.h:239 -- pragma Import (C, strtol_l, "strtol_l"); -- function strtoul_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- base : int; -- loc : Libc.xlocale_h.locale_t) return unsigned_long; -- /usr/include/stdlib.h:243 -- pragma Import (C, strtoul_l, "strtoul_l"); -- function strtoll_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- base : int; -- loc : Libc.xlocale_h.locale_t) return Long_Long_Integer; -- /usr/include/stdlib.h:249 -- pragma Import (C, strtoll_l, "strtoll_l"); -- function strtoull_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- base : int; -- loc : Libc.xlocale_h.locale_t) return Extensions.unsigned_long_long; -- /usr/include/stdlib.h:255 -- pragma Import (C, strtoull_l, "strtoull_l"); -- function strtod_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- loc : Libc.xlocale_h.locale_t) return double; -- /usr/include/stdlib.h:260 -- pragma Import (C, strtod_l, "strtod_l"); -- function strtof_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- loc : Libc.xlocale_h.locale_t) return float; -- /usr/include/stdlib.h:264 -- pragma Import (C, strtof_l, "strtof_l"); -- function strtold_l -- (nptr : Interfaces.C.Strings.chars_ptr; -- endptr : System.Address; -- loc : Libc.xlocale_h.locale_t) return long_double; -- /usr/include/stdlib.h:268 -- pragma Import (C, strtold_l, "strtold_l"); function l64a (n : long) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:305 pragma Import (C, l64a, "l64a"); function a64l (s : Interfaces.C.Strings.chars_ptr) return long; -- /usr/include/stdlib.h:308 pragma Import (C, a64l, "a64l"); function random return long; -- /usr/include/stdlib.h:321 pragma Import (C, random, "random"); procedure srandom (seed : unsigned); -- /usr/include/stdlib.h:324 pragma Import (C, srandom, "srandom"); function initstate (seed : unsigned; statebuf : Interfaces.C.Strings.chars_ptr; statelen : size_t) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:330 pragma Import (C, initstate, "initstate"); function setstate (statebuf : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:335 pragma Import (C, setstate, "setstate"); -- type random_data is record -- fptr : access Libc.Stdint.int32_t; -- /usr/include/stdlib.h:345 -- rptr : access Libc.Stdint.int32_t; -- /usr/include/stdlib.h:346 -- state : access Libc.Stdint.int32_t; -- /usr/include/stdlib.h:347 -- rand_type : aliased int; -- /usr/include/stdlib.h:348 -- rand_deg : aliased int; -- /usr/include/stdlib.h:349 -- rand_sep : aliased int; -- /usr/include/stdlib.h:350 -- end_ptr : access Libc.Stdint.int32_t; -- /usr/include/stdlib.h:351 -- end record; -- pragma Convention (C_Pass_By_Copy, random_data); -- /usr/include/stdlib.h:343 -- function random_r (buf : access random_data; result : access Libc.Stdint.int32_t) return int; -- /usr/include/stdlib.h:354 -- pragma Import (C, random_r, "random_r"); -- function srandom_r (seed : unsigned; buf : access random_data) return int; -- /usr/include/stdlib.h:357 -- pragma Import (C, srandom_r, "srandom_r"); -- function initstate_r -- (seed : unsigned; -- statebuf : Interfaces.C.Strings.chars_ptr; -- statelen : size_t; -- buf : access random_data) return int; -- /usr/include/stdlib.h:360 -- pragma Import (C, initstate_r, "initstate_r"); -- function setstate_r (statebuf : Interfaces.C.Strings.chars_ptr; buf : access random_data) return int; -- /usr/include/stdlib.h:365 -- pragma Import (C, setstate_r, "setstate_r"); function rand_r (seed : access unsigned) return int; -- /usr/include/stdlib.h:381 pragma Import (C, rand_r, "rand_r"); function drand48 return double; -- /usr/include/stdlib.h:389 pragma Import (C, drand48, "drand48"); function erand48 (xsubi : access unsigned_short) return double; -- /usr/include/stdlib.h:390 pragma Import (C, erand48, "erand48"); function lrand48 return long; -- /usr/include/stdlib.h:393 pragma Import (C, lrand48, "lrand48"); function nrand48 (xsubi : access unsigned_short) return long; -- /usr/include/stdlib.h:394 pragma Import (C, nrand48, "nrand48"); function mrand48 return long; -- /usr/include/stdlib.h:398 pragma Import (C, mrand48, "mrand48"); function jrand48 (xsubi : access unsigned_short) return long; -- /usr/include/stdlib.h:399 pragma Import (C, jrand48, "jrand48"); procedure srand48 (seedval : long); -- /usr/include/stdlib.h:403 pragma Import (C, srand48, "srand48"); function seed48 (seed16v : access unsigned_short) return access unsigned_short; -- /usr/include/stdlib.h:404 pragma Import (C, seed48, "seed48"); procedure lcong48 (param : access unsigned_short); -- /usr/include/stdlib.h:406 pragma Import (C, lcong48, "lcong48"); type drand48_data_x_array is array (0 .. 2) of aliased unsigned_short; type drand48_data_old_x_array is array (0 .. 2) of aliased unsigned_short; type drand48_data is record x : aliased drand48_data_x_array; -- /usr/include/stdlib.h:414 old_x : aliased drand48_data_old_x_array; -- /usr/include/stdlib.h:415 c : aliased unsigned_short; -- /usr/include/stdlib.h:416 init : aliased unsigned_short; -- /usr/include/stdlib.h:417 a : aliased Extensions.unsigned_long_long; -- /usr/include/stdlib.h:418 end record; pragma Convention (C_Pass_By_Copy, drand48_data); -- /usr/include/stdlib.h:412 function drand48_r (buffer : access drand48_data; result : access double) return int; -- /usr/include/stdlib.h:423 pragma Import (C, drand48_r, "drand48_r"); function erand48_r (xsubi : access unsigned_short; buffer : access drand48_data; result : access double) return int; -- /usr/include/stdlib.h:425 pragma Import (C, erand48_r, "erand48_r"); function lrand48_r (buffer : access drand48_data; result : access long) return int; -- /usr/include/stdlib.h:430 pragma Import (C, lrand48_r, "lrand48_r"); function nrand48_r (xsubi : access unsigned_short; buffer : access drand48_data; result : access long) return int; -- /usr/include/stdlib.h:433 pragma Import (C, nrand48_r, "nrand48_r"); function mrand48_r (buffer : access drand48_data; result : access long) return int; -- /usr/include/stdlib.h:439 pragma Import (C, mrand48_r, "mrand48_r"); function jrand48_r (xsubi : access unsigned_short; buffer : access drand48_data; result : access long) return int; -- /usr/include/stdlib.h:442 pragma Import (C, jrand48_r, "jrand48_r"); function srand48_r (seedval : long; buffer : access drand48_data) return int; -- /usr/include/stdlib.h:448 pragma Import (C, srand48_r, "srand48_r"); function seed48_r (seed16v : access unsigned_short; buffer : access drand48_data) return int; -- /usr/include/stdlib.h:451 pragma Import (C, seed48_r, "seed48_r"); function lcong48_r (param : access unsigned_short; buffer : access drand48_data) return int; -- /usr/include/stdlib.h:454 pragma Import (C, lcong48_r, "lcong48_r"); procedure cfree (ptr : System.Address); -- /usr/include/stdlib.h:488 pragma Import (C, cfree, "cfree"); function valloc (size : size_t) return System.Address; -- /usr/include/stdlib.h:498 pragma Import (C, valloc, "valloc"); function posix_memalign (memptr : System.Address; alignment : size_t; size : size_t) return int; -- /usr/include/stdlib.h:503 pragma Import (C, posix_memalign, "posix_memalign"); function aligned_alloc (alignment : size_t; size : size_t) return System.Address; -- /usr/include/stdlib.h:509 pragma Import (C, aligned_alloc, "aligned_alloc"); function at_quick_exit (func : access procedure) return int; -- /usr/include/stdlib.h:524 pragma Import (C, at_quick_exit, "at_quick_exit"); function on_exit (func : access procedure (arg1 : int; arg2 : System.Address); arg : System.Address) return int; -- /usr/include/stdlib.h:535 pragma Import (C, on_exit, "on_exit"); procedure quick_exit (status : int) with No_Return; -- /usr/include/stdlib.h:549 pragma Import (C, quick_exit, "quick_exit"); function secure_getenv (name : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:570 pragma Import (C, secure_getenv, "secure_getenv"); function putenv (string : Interfaces.C.Strings.chars_ptr) return int; -- /usr/include/stdlib.h:578 pragma Import (C, putenv, "putenv"); function setenv (name : char_array; value : char_array; replace : int) return int; -- /usr/include/stdlib.h:584 pragma Import (C, setenv, "setenv"); function unsetenv (name : Interfaces.C.Strings.chars_ptr) return int; -- /usr/include/stdlib.h:588 pragma Import (C, unsetenv, "unsetenv"); function clearenv return int; -- /usr/include/stdlib.h:595 pragma Import (C, clearenv, "clearenv"); function mktemp (template : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:606 pragma Import (C, mktemp, "mktemp"); function mkstemp (template : Interfaces.C.Strings.chars_ptr) return int; -- /usr/include/stdlib.h:620 pragma Import (C, mkstemp, "mkstemp"); function mkstemp64 (template : Interfaces.C.Strings.chars_ptr) return int; -- /usr/include/stdlib.h:630 pragma Import (C, mkstemp64, "mkstemp64"); function mkstemps (template : Interfaces.C.Strings.chars_ptr; suffixlen : int) return int; -- /usr/include/stdlib.h:642 pragma Import (C, mkstemps, "mkstemps"); function mkstemps64 (template : Interfaces.C.Strings.chars_ptr; suffixlen : int) return int; -- /usr/include/stdlib.h:652 pragma Import (C, mkstemps64, "mkstemps64"); function mkdtemp (template : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:663 pragma Import (C, mkdtemp, "mkdtemp"); function mkostemp (template : Interfaces.C.Strings.chars_ptr; flags : int) return int; -- /usr/include/stdlib.h:674 pragma Import (C, mkostemp, "mkostemp"); function mkostemp64 (template : Interfaces.C.Strings.chars_ptr; flags : int) return int; -- /usr/include/stdlib.h:684 pragma Import (C, mkostemp64, "mkostemp64"); function mkostemps (template : Interfaces.C.Strings.chars_ptr; suffixlen : int; flags : int) return int; -- /usr/include/stdlib.h:694 pragma Import (C, mkostemps, "mkostemps"); function mkostemps64 (template : Interfaces.C.Strings.chars_ptr; suffixlen : int; flags : int) return int; -- /usr/include/stdlib.h:706 pragma Import (C, mkostemps64, "mkostemps64"); function canonicalize_file_name (name : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:724 pragma Import (C, canonicalize_file_name, "canonicalize_file_name"); function realpath (name : Interfaces.C.Strings.chars_ptr; resolved : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:734 pragma Import (C, realpath, "realpath"); subtype comparison_fn_t is compar_fn_t; -- /usr/include/stdlib.h:745 type compar_d_fn_t is access function (arg1 : System.Address; arg2 : System.Address; arg3 : System.Address) return int; pragma Convention (C, compar_d_fn_t); -- /usr/include/stdlib.h:749 procedure qsort_r (base : System.Address; nmemb : size_t; size : size_t; compar : compar_d_fn_t; arg : System.Address); -- /usr/include/stdlib.h:768 pragma Import (C, qsort_r, "qsort_r"); function ecvt (value : double; ndigit : int; decpt : access int; sign : access int) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:812 pragma Import (C, ecvt, "ecvt"); function fcvt (value : double; ndigit : int; decpt : access int; sign : access int) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:818 pragma Import (C, fcvt, "fcvt"); function gcvt (value : double; ndigit : int; buf : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:824 pragma Import (C, gcvt, "gcvt"); function qecvt (value : long_double; ndigit : int; decpt : access int; sign : access int) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:830 pragma Import (C, qecvt, "qecvt"); function qfcvt (value : long_double; ndigit : int; decpt : access int; sign : access int) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:833 pragma Import (C, qfcvt, "qfcvt"); function qgcvt (value : long_double; ndigit : int; buf : Interfaces.C.Strings.chars_ptr) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:836 pragma Import (C, qgcvt, "qgcvt"); function ecvt_r (value : double; ndigit : int; decpt : access int; sign : access int; buf : Interfaces.C.Strings.chars_ptr; len : size_t) return int; -- /usr/include/stdlib.h:842 pragma Import (C, ecvt_r, "ecvt_r"); function fcvt_r (value : double; ndigit : int; decpt : access int; sign : access int; buf : Interfaces.C.Strings.chars_ptr; len : size_t) return int; -- /usr/include/stdlib.h:845 pragma Import (C, fcvt_r, "fcvt_r"); function qecvt_r (value : long_double; ndigit : int; decpt : access int; sign : access int; buf : Interfaces.C.Strings.chars_ptr; len : size_t) return int; -- /usr/include/stdlib.h:849 pragma Import (C, qecvt_r, "qecvt_r"); function qfcvt_r (value : long_double; ndigit : int; decpt : access int; sign : access int; buf : Interfaces.C.Strings.chars_ptr; len : size_t) return int; -- /usr/include/stdlib.h:853 pragma Import (C, qfcvt_r, "qfcvt_r"); function rpmatch (response : Interfaces.C.Strings.chars_ptr) return int; -- /usr/include/stdlib.h:888 pragma Import (C, rpmatch, "rpmatch"); function getsubopt (optionp : System.Address; tokens : System.Address; valuep : System.Address) return int; -- /usr/include/stdlib.h:899 pragma Import (C, getsubopt, "getsubopt"); procedure setkey (key : Interfaces.C.Strings.chars_ptr); -- /usr/include/stdlib.h:908 pragma Import (C, setkey, "setkey"); function posix_openpt (oflag : int) return int; -- /usr/include/stdlib.h:916 pragma Import (C, posix_openpt, "posix_openpt"); function grantpt (fd : int) return int; -- /usr/include/stdlib.h:924 pragma Import (C, grantpt, "grantpt"); function unlockpt (fd : int) return int; -- /usr/include/stdlib.h:928 pragma Import (C, unlockpt, "unlockpt"); function ptsname (fd : int) return Interfaces.C.Strings.chars_ptr; -- /usr/include/stdlib.h:933 pragma Import (C, ptsname, "ptsname"); function ptsname_r (fd : int; buf : Interfaces.C.Strings.chars_ptr; buflen : size_t) return int; -- /usr/include/stdlib.h:940 pragma Import (C, ptsname_r, "ptsname_r"); function getpt return int; -- /usr/include/stdlib.h:944 pragma Import (C, getpt, "getpt"); function getloadavg (loadavg : access double; nelem : int) return int; -- /usr/include/stdlib.h:951 pragma Import (C, getloadavg, "getloadavg"); end Libc.Stdlib.GNU;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2011, 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 League.Strings; package AMF.Internals.Collections.Strings is pragma Preelaborate; type Shared_String_Collection is abstract new Shared_Collection with null record; type Shared_String_Collection_Access is access all Shared_String_Collection'Class; not overriding function Element (Self : not null access constant Shared_String_Collection; Index : Positive) return League.Strings.Universal_String is abstract; overriding function Element (Self : not null access constant Shared_String_Collection; Index : Positive) return League.Holders.Holder; end AMF.Internals.Collections.Strings;
-- CD5014G.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 AN ADDRESS CLAUSE CAN BE GIVEN IN THE PRIVATE PART -- OF A GENERIC PACKAGE SPECIFICATION FOR A VARIABLE OF A FIXED -- POINT TYPE, WHERE THE VARIABLE IS DECLARED IN THE VISIBLE PART OF -- THE SPECIFICATION. -- HISTORY: -- CDJ 07/24/87 CREATED ORIGINAL TEST. -- BCB 10/01/87 CHANGED TEST TO STANDARD FORMAT. -- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'. -- MCH 04/03/90 ADDED INSTANTIATION. WITH SYSTEM; USE SYSTEM; WITH SPPRT13; USE SPPRT13; WITH REPORT; USE REPORT; PROCEDURE CD5014G IS BEGIN TEST ("CD5014G", " AN ADDRESS CLAUSE CAN BE GIVEN " & "IN THE PRIVATE PART OF A GENERIC PACKAGE " & "SPECIFICATION FOR A VARIABLE OF A FIXED " & "POINT TYPE, WHERE THE VARIABLE IS DECLARED " & "IN THE VISIBLE PART OF THE SPECIFICATION"); DECLARE GENERIC PACKAGE PKG IS TYPE FIXED_TYPE IS DELTA 0.5 RANGE 0.0 .. 100.0; FIXED_OBJ1 : FIXED_TYPE := 50.0; PRIVATE FOR FIXED_OBJ1 USE AT VARIABLE_ADDRESS; END PKG; PACKAGE BODY PKG IS BEGIN IF EQUAL(3,3) THEN FIXED_OBJ1 := 5.0; END IF; IF FIXED_OBJ1 /= 5.0 THEN FAILED ("INCORRECT VALUE FOR FIXED POINT VARIABLE"); END IF; IF FIXED_OBJ1'ADDRESS /= VARIABLE_ADDRESS THEN FAILED ("INCORRECT ADDRESS FOR FIXED POINT VARIABLE"); END IF; END PKG; PACKAGE INSTANTIATE IS NEW PKG; BEGIN NULL; END; RESULT; END CD5014G;
-- SPDX-FileCopyrightText: 2020 Max Reznik <reznikmm@gmail.com> -- -- SPDX-License-Identifier: MIT ---------------------------------------------------------------- with Ada.Tags; with League.Strings; with Markdown.Blocks; limited with Markdown.Visitors; package Markdown.ATX_Headings is type ATX_Heading is new Markdown.Blocks.Block with private; overriding function Create (Line : not null access Markdown.Blocks.Text_Line) return ATX_Heading; overriding procedure Visit (Self : in out ATX_Heading; Visitor : in out Markdown.Visitors.Visitor'Class); procedure Filter (Line : Markdown.Blocks.Text_Line; Tag : in out Ada.Tags.Tag; CIP : out Can_Interrupt_Paragraph); subtype Heading_Level is Positive range 1 .. 6; function Title (Self : ATX_Heading'Class) return League.Strings.Universal_String; function Level (Self : ATX_Heading'Class) return Heading_Level; private type ATX_Heading is new Markdown.Blocks.Block with record Title : League.Strings.Universal_String; Level : Heading_Level := 1; end record; end Markdown.ATX_Headings;
------------------------------------------------------------------------------ -- -- -- Matreshka Project -- -- -- -- Ada Modeling Framework -- -- -- -- Runtime Library Component -- -- -- ------------------------------------------------------------------------------ -- -- -- Copyright © 2012-2013, 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. ------------------------------------------------------------------------------ limited with AMF.OCL.Ocl_Expressions; limited with AMF.UML.Parameters; with AMF.UML.Typed_Elements; package AMF.OCL.Variables is pragma Preelaborate; type OCL_Variable is limited interface and AMF.UML.Typed_Elements.UML_Typed_Element; type OCL_Variable_Access is access all OCL_Variable'Class; for OCL_Variable_Access'Storage_Size use 0; not overriding function Get_Init_Expression (Self : not null access constant OCL_Variable) return AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access is abstract; -- Getter of Variable::initExpression. -- not overriding procedure Set_Init_Expression (Self : not null access OCL_Variable; To : AMF.OCL.Ocl_Expressions.OCL_Ocl_Expression_Access) is abstract; -- Setter of Variable::initExpression. -- not overriding function Get_Represented_Parameter (Self : not null access constant OCL_Variable) return AMF.UML.Parameters.UML_Parameter_Access is abstract; -- Getter of Variable::representedParameter. -- not overriding procedure Set_Represented_Parameter (Self : not null access OCL_Variable; To : AMF.UML.Parameters.UML_Parameter_Access) is abstract; -- Setter of Variable::representedParameter. -- end AMF.OCL.Variables;
------------------------------------------------------------------------------ -- -- -- Copyright (C) 2015-2016, 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 HAL.Bitmap; package HAL.Framebuffer is subtype FB_Color_Mode is HAL.Bitmap.Bitmap_Color_Mode range HAL.Bitmap.ARGB_8888 .. HAL.Bitmap.M_1; type Display_Orientation is (Default, Landscape, Portrait); type Wait_Mode is (Polling, Interrupt); type Frame_Buffer_Display is limited interface; type Any_Frame_Buffer_Display is access all Frame_Buffer_Display'Class; function Max_Layers (This : Frame_Buffer_Display) return Positive is abstract; function Supported (This : Frame_Buffer_Display; Mode : FB_Color_Mode) return Boolean is abstract; procedure Set_Orientation (This : in out Frame_Buffer_Display; Orientation : Display_Orientation) is abstract; procedure Set_Mode (This : in out Frame_Buffer_Display; Mode : Wait_Mode) is abstract; function Initialized (This : Frame_Buffer_Display) return Boolean is abstract; function Width (This : Frame_Buffer_Display) return Positive is abstract; function Height (This : Frame_Buffer_Display) return Positive is abstract; function Swapped (This : Frame_Buffer_Display) return Boolean is abstract; -- Whether X/Y coordinates are considered Swapped by the drawing primitives -- This simulates Landscape/Portrait orientation on displays not supporting -- hardware orientation change. procedure Set_Background (This : Frame_Buffer_Display; R, G, B : UInt8) is abstract; procedure Initialize_Layer (This : in out Frame_Buffer_Display; Layer : Positive; Mode : FB_Color_Mode; X : Natural := 0; Y : Natural := 0; Width : Positive := Positive'Last; Height : Positive := Positive'Last) is abstract; -- All layers are double buffered, so an explicit call to Update_Layer -- needs to be performed to actually display the current buffer attached -- to the layer. -- Alloc is called to create the actual buffer. function Initialized (This : Frame_Buffer_Display; Layer : Positive) return Boolean is abstract; procedure Update_Layer (This : in out Frame_Buffer_Display; Layer : Positive; Copy_Back : Boolean := False) is abstract; -- Updates the layer so that the hidden buffer is displayed. procedure Update_Layers (This : in out Frame_Buffer_Display) is abstract; -- Updates all initialized layers at once with their respective hidden -- buffer. function Color_Mode (This : Frame_Buffer_Display; Layer : Positive) return FB_Color_Mode is abstract; -- Retrieves the current color mode for the layer. function Hidden_Buffer (This : in out Frame_Buffer_Display; Layer : Positive) return not null HAL.Bitmap.Any_Bitmap_Buffer is abstract; -- Retrieves the current hidden buffer for the layer. function Pixel_Size (Display : Frame_Buffer_Display; Layer : Positive) return Positive is abstract; -- Retrieves the current hidden buffer for the layer. end HAL.Framebuffer;
pragma Ada_2012; package body DDS.Request_Reply.Tests.Simple.Server is ------------------------ -- Compute_And_Replie -- ------------------------ task body Ref2 is Octets_Data : DDS.Octets; String_Data : DDS.String; L_Replier : DDS.Request_Reply.Replier.Ref_Access; L_Id : DDS.SampleIdentity_T; begin select accept Compute_And_Reply (Replier : Octets_Replier.Ref_Access; Data : DDS.Octets; Id : DDS.SampleIdentity_T) do Dds.Copy (Octets_Data, Data); L_Id := Id; L_Replier := Request_Reply.Replier.Ref_Access (Replier); end Compute_And_Reply; declare L : constant Standard.String := "Ret Octets"; Result : constant Dds.Octets := Dds.Octets'(Length => L'Length, Value => L'Address); begin Octets_Replier.Ref_Access (L_Replier).Send_Reply (Result, Id => L_Id); end; or accept Compute_And_Reply (Replier : String_Replier.Ref_Access; Data : DDS.String; Id : DDS.SampleIdentity_T) do Dds.Copy (String_Data, Data); L_Id := Id; L_Replier := Request_Reply.Replier.Ref_Access (Replier); end Compute_And_Reply; declare Ret : DDS.String; begin Copy (Ret, "In reply to: """); Append (Ret, String_Data); Append (Ret, """"); String_Replier.Ref_Access (L_Replier).Send_Reply (Ret, Id => L_Id); Finalize (Ret); end; or terminate; end select; end Ref2; procedure Compute_And_Reply (Self : not null access Ref; Replier : Octets_Replier.Ref_Access; Data : DDS.Octets; Id : DDS.SampleIdentity_T) is L : constant Standard.String := "Ret Octets"; Result : constant Dds.Octets := Dds.Octets'(Length => L'Length, Value => L'Address); begin Replier.Send_Reply (Result, Id => Id); end Compute_And_Reply; ------------------------ -- Compute_And_Replie -- ------------------------ procedure Compute_And_Reply (Self : not null access Ref; Replier : String_Replier.Ref_Access; Data : DDS.String; Id : DDS.SampleIdentity_T) is Ret : String; begin Copy (Ret, "In reply to: """); Append (Ret, Data); Append (Ret, """"); Replier.Send_Reply (Ret, Id => Id); end Compute_And_Reply; end DDS.Request_Reply.Tests.Simple.Server;
with Ada.Characters.Handling; use Ada.Characters.Handling; package Abc is type Block_Faces is array(1..2) of Character; type Block_List is array(positive range <>) of Block_Faces; function Can_Make_Word(W: String; Blocks: Block_List) return Boolean; end Abc; package body Abc is function Can_Make_Word(W: String; Blocks: Block_List) return Boolean is Used : array(Blocks'Range) of Boolean := (Others => False); subtype wIndex is Integer range W'First..W'Last; wPos : wIndex; begin if W'Length = 0 then return True; end if; wPos := W'First; while True loop declare C : Character := To_Upper(W(wPos)); X : constant wIndex := wPos; begin for I in Blocks'Range loop if (not Used(I)) then if C = To_Upper(Blocks(I)(1)) or C = To_Upper(Blocks(I)(2)) then Used(I) := True; if wPos = W'Last then return True; end if; wPos := wIndex'Succ(wPos); exit; end if; end if; end loop; if X = wPos then return False; end if; end; end loop; return False; end Can_Make_Word; end Abc; with Ada.Text_IO, Ada.Strings.Unbounded, Abc; use Ada.Text_IO, Ada.Strings.Unbounded, Abc; procedure Abc_Problem is Blocks : Block_List := ( ('B','O'), ('X','K'), ('D','Q'), ('C','P') , ('N','A'), ('G','T'), ('R','E'), ('T','G') , ('Q','D'), ('F','S'), ('J','W'), ('H','U') , ('V','I'), ('A','N'), ('O','B'), ('E','R') , ('F','S'), ('L','Y'), ('P','C'), ('Z','M') ); function "+" (S : String) return Unbounded_String renames To_Unbounded_String; words : array(positive range <>) of Unbounded_String := ( +"A" , +"BARK" , +"BOOK" , +"TREAT" , +"COMMON" , +"SQUAD" , +"CONFUSE" -- Border cases: -- , +"CONFUSE2" -- , +"" ); begin for I in words'Range loop Put_Line ( To_String(words(I)) & ": " & Boolean'Image(Can_Make_Word(To_String(words(I)),Blocks)) ); end loop; end Abc_Problem;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with swig; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_ungrab_button_request_t is -- Item -- type Item is record major_opcode : aliased Interfaces.Unsigned_8; button : aliased Interfaces.Unsigned_8; length : aliased Interfaces.Unsigned_16; grab_window : aliased xcb.xcb_window_t; modifiers : aliased Interfaces.Unsigned_16; pad0 : aliased swig.int8_t_Array (0 .. 1); end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_ungrab_button_request_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_ungrab_button_request_t.Item, Element_Array => xcb.xcb_ungrab_button_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_ungrab_button_request_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_ungrab_button_request_t.Pointer, Element_Array => xcb.xcb_ungrab_button_request_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_ungrab_button_request_t;
with Ada.Exception_Identification.From_Here; with System.Address_To_Named_Access_Conversions; with C.errno; with C.stdlib; with C.sys.file; with C.sys.mman; with C.sys.stat; with C.sys.types; package body System.Native_IO is use Ada.Exception_Identification.From_Here; use type Ada.IO_Modes.File_Shared; use type Ada.IO_Modes.File_Shared_Spec; use type Ada.Streams.Stream_Element_Offset; use type Storage_Elements.Storage_Offset; use type C.char; -- Name_Character use type C.char_array; -- Name_String use type C.char_ptr; -- Name_Pointer use type C.size_t; use type C.unsigned_int; use type C.unsigned_short; use type C.sys.types.off_t; pragma Compile_Time_Error ( C.sys.types.off_t'Size /= 64, "off_t is not 64bit"); function strlen (s : not null access constant C.char) return C.size_t with Import, Convention => Intrinsic, External_Name => "__builtin_strlen"; package Name_Pointer_Conv is new Address_To_Named_Access_Conversions (Name_Character, Name_Pointer); Temp_Variable : constant C.char_array := "TMPDIR" & C.char'Val (0); Temp_Template : constant C.char_array := "ADAXXXXXX" & C.char'Val (0); -- implementation procedure Free (Item : in out Name_Pointer) is begin C.stdlib.free (C.void_ptr (Name_Pointer_Conv.To_Address (Item))); Item := null; end Free; procedure New_External_Name ( Item : String; Out_Item : aliased out Name_Pointer) is begin Out_Item := Name_Pointer_Conv.To_Pointer ( Address ( C.stdlib.malloc ( Item'Length * Zero_Terminated_Strings.Expanding + 2))); -- '*' & NUL if Out_Item = null then raise Storage_Error; end if; declare Out_Item_All : Name_String (0 .. 1); -- at least for Out_Item_All'Address use Name_Pointer_Conv.To_Address (Out_Item); begin Out_Item_All (0) := '*'; Zero_Terminated_Strings.To_C (Item, Out_Item_All (1)'Access); end; end New_External_Name; procedure Open_Temporary ( Handle : aliased out Handle_Type; Out_Item : aliased out Name_Pointer) is Temp_Template_Length : constant C.size_t := Temp_Template'Length - 1; Temp_Dir : C.char_ptr; Out_Length : C.size_t; begin -- compose template Temp_Dir := C.stdlib.getenv (Temp_Variable (0)'Access); if Temp_Dir /= null and then Temp_Dir.all /= C.char'Val (0) then -- environment variable TMPDIR Out_Length := strlen (Temp_Dir); Out_Item := Name_Pointer_Conv.To_Pointer ( Address ( C.stdlib.malloc ( Out_Length + Temp_Template_Length + 2))); -- '/' & NUL if Out_Item = null then raise Storage_Error; end if; declare Temp_Dir_All : C.char_array (0 .. Out_Length - 1); for Temp_Dir_All'Address use Name_Pointer_Conv.To_Address (Temp_Dir); Out_Item_All : C.char_array (0 .. Out_Length - 1); for Out_Item_All'Address use Name_Pointer_Conv.To_Address (Out_Item); begin Out_Item_All := Temp_Dir_All; end; else -- current directory Out_Item := C.unistd.getcwd (null, 0); Out_Length := strlen (Out_Item); -- reuse the memory from malloc (similar to reallocf) declare New_Out_Item : constant C.char_ptr := Name_Pointer_Conv.To_Pointer ( Address ( C.stdlib.realloc ( C.void_ptr (Name_Pointer_Conv.To_Address (Out_Item)), Out_Length + Temp_Template_Length + 2))); -- '/' & NUL begin if New_Out_Item = null then raise Storage_Error; end if; Out_Item := New_Out_Item; end; end if; declare Out_Item_All : C.char_array ( 0 .. Out_Length + Temp_Template_Length + 1); -- '/' & NUL for Out_Item_All'Address use Name_Pointer_Conv.To_Address (Out_Item); begin -- append slash if Out_Item_All (Out_Length - 1) /= '/' then Out_Item_All (Out_Length) := '/'; Out_Length := Out_Length + 1; end if; -- append template Out_Item_All (Out_Length .. Out_Length + Temp_Template_Length) := Temp_Template; -- including nul end; -- open declare use C.stdlib; -- Linux, POSIX.1-2008 use C.unistd; -- Darwin, FreeBSD begin Handle := mkstemp (Out_Item); end; if Handle < 0 then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; Set_Close_On_Exec (Handle); end Open_Temporary; procedure Open_Ordinary ( Method : Open_Method; Handle : aliased out Handle_Type; Mode : File_Mode; Name : not null Name_Pointer; Form : Packed_Form) is O_EXLOCK_Is_Missing : constant Boolean := C.fcntl.O_EXLOCK = 0; Masked_Mode : constant File_Mode := Mode and Read_Write_Mask; Flags : C.unsigned_int; Modes : constant := 8#644#; Shared : Ada.IO_Modes.File_Shared; errno : C.signed_int; begin -- modes if Form.Shared /= Ada.IO_Modes.By_Mode then Shared := Ada.IO_Modes.File_Shared (Form.Shared); else if Masked_Mode = Read_Only_Mode then Shared := Ada.IO_Modes.Read_Only; else Shared := Ada.IO_Modes.Deny; end if; end if; Flags := Masked_Mode; case Method is when Create => Shared := Ada.IO_Modes.Deny; if Mode = Read_Only_Mode then -- In_File Flags := C.fcntl.O_RDWR; end if; Flags := Flags or C.fcntl.O_CREAT; if Mode = Write_Only_Mode then -- Out_File Flags := Flags or C.fcntl.O_TRUNC; end if; if not Form.Overwrite then Flags := Flags or C.fcntl.O_EXCL; end if; when Open => if Mode = Write_Only_Mode then -- Out_File Flags := Flags or C.fcntl.O_TRUNC; end if; when Reset => null; -- no truncation end case; if (Mode and Append_Mode) /= 0 then Flags := Flags or C.fcntl.O_APPEND; end if; if Shared /= Ada.IO_Modes.Allow then if not O_EXLOCK_Is_Missing then declare Lock_Flags : constant array ( Ada.IO_Modes.File_Shared range Ada.IO_Modes.Read_Only .. Ada.IO_Modes.Deny) of C.unsigned_int := ( Ada.IO_Modes.Read_Only => C.fcntl.O_SHLOCK, Ada.IO_Modes.Deny => C.fcntl.O_EXLOCK); begin Flags := Flags or Lock_Flags (Shared); end; if not Form.Wait then -- O_NONBLOCK makes open to return immediately and EWOULDBLOCK -- instead of waiting, when a file is already locked. Flags := Flags or C.fcntl.O_NONBLOCK; end if; else null; -- use flock end if; end if; Flags := Flags or C.fcntl.O_CLOEXEC; -- open Handle := C.fcntl.open (Name, C.signed_int (Flags), Modes); if Handle < 0 then errno := C.errno.errno; case errno is when C.errno.ENOTDIR | C.errno.ENAMETOOLONG | C.errno.ENOENT | C.errno.EEXIST -- O_EXCL | C.errno.EISDIR => Raise_Exception (Name_Error'Identity); when C.errno.EWOULDBLOCK => Raise_Exception (Tasking_Error'Identity); -- Is it suitable? when others => Raise_Exception (IO_Exception_Id (errno)); end case; end if; declare O_CLOEXEC_Is_Missing : constant Boolean := C.fcntl.O_CLOEXEC = 0; pragma Warnings (Off, O_CLOEXEC_Is_Missing); begin if O_CLOEXEC_Is_Missing then -- set FD_CLOEXEC if O_CLOEXEC is missing Set_Close_On_Exec (Handle); end if; end; if Shared /= Ada.IO_Modes.Allow then if not O_EXLOCK_Is_Missing then if not Form.Wait then -- Unset O_NONBLOCK for normal use. Unset (Handle, Mask => not C.fcntl.O_NONBLOCK); end if; else declare Race_Is_Raising : constant Boolean := not Form.Wait; Operation_Table : constant array ( Ada.IO_Modes.File_Shared range Ada.IO_Modes.Read_Only .. Ada.IO_Modes.Deny) of C.unsigned_int := ( Ada.IO_Modes.Read_Only => C.sys.file.LOCK_SH, Ada.IO_Modes.Deny => C.sys.file.LOCK_EX); operation : C.unsigned_int; begin operation := Operation_Table (Shared); if Race_Is_Raising then operation := operation or C.sys.file.LOCK_NB; end if; if C.sys.file.flock (Handle, C.signed_int (operation)) < 0 then errno := C.errno.errno; case errno is when C.errno.EWOULDBLOCK => Raise_Exception (Tasking_Error'Identity); -- Is Tasking_Error suitable? when others => Raise_Exception (Use_Error'Identity); end case; end if; end; end if; end if; end Open_Ordinary; procedure Close_Ordinary ( Handle : Handle_Type; Name : Name_Pointer; Raise_On_Error : Boolean) is pragma Unreferenced (Name); Error : Boolean; begin Error := C.unistd.close (Handle) < 0; if Error and then Raise_On_Error then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; end Close_Ordinary; procedure Delete_Ordinary ( Handle : Handle_Type; Name : Name_Pointer; Raise_On_Error : Boolean) is Error : Boolean; begin Error := C.unistd.close (Handle) < 0; if not Error then Error := C.unistd.unlink (Name) < 0; end if; if Error and then Raise_On_Error then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; end Delete_Ordinary; procedure Set_Close_On_Exec (Handle : Handle_Type) is Error : Boolean; begin Error := C.fcntl.fcntl ( Handle, C.fcntl.F_SETFD, C.fcntl.FD_CLOEXEC) < 0; if Error then Raise_Exception (Use_Error'Identity); end if; end Set_Close_On_Exec; procedure Unset (Handle : Handle_Type; Mask : File_Mode) is Flags, New_Flags : C.signed_int; begin Flags := C.fcntl.fcntl (Handle, C.fcntl.F_GETFL); if Flags < 0 then Raise_Exception (Use_Error'Identity); end if; New_Flags := C.signed_int (C.unsigned_int (Flags) and Mask); if New_Flags /= Flags then declare Error : Boolean; begin Error := C.fcntl.fcntl (Handle, C.fcntl.F_SETFL, New_Flags) < 0; if Error then Raise_Exception (Use_Error'Identity); end if; end; end if; end Unset; function Is_Terminal (Handle : Handle_Type) return Boolean is begin return C.unistd.isatty (Handle) /= 0; end Is_Terminal; function Is_Seekable (Handle : Handle_Type) return Boolean is begin return C.unistd.lseek ( Handle, 0, C.unistd.SEEK_CUR) >= 0; end Is_Seekable; function Block_Size (Handle : Handle_Type) return Ada.Streams.Stream_Element_Count is Result : Ada.Streams.Stream_Element_Count; begin if Is_Terminal (Handle) then Result := 0; -- no buffering for terminal else declare Info : aliased C.sys.stat.struct_stat; File_Type : C.sys.types.mode_t; begin if C.sys.stat.fstat (Handle, Info'Access) < 0 then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; File_Type := Info.st_mode and C.sys.stat.S_IFMT; if File_Type = C.sys.stat.S_IFIFO or else File_Type = C.sys.stat.S_IFSOCK then Result := 0; -- no buffering for pipe and socket else -- disk file Result := Ada.Streams.Stream_Element_Offset'Max ( 2, -- Buffer_Length /= 1 Ada.Streams.Stream_Element_Offset (Info.st_blksize)); end if; end; end if; return Result; end Block_Size; procedure Read ( Handle : Handle_Type; Item : Address; Length : Ada.Streams.Stream_Element_Offset; Out_Length : out Ada.Streams.Stream_Element_Offset) is Read_Size : C.sys.types.ssize_t; begin Read_Size := C.unistd.read ( Handle, C.void_ptr (Item), C.size_t (Length)); Out_Length := Ada.Streams.Stream_Element_Offset (Read_Size); end Read; procedure Write ( Handle : Handle_Type; Item : Address; Length : Ada.Streams.Stream_Element_Offset; Out_Length : out Ada.Streams.Stream_Element_Offset) is Written_Size : C.sys.types.ssize_t; begin Written_Size := C.unistd.write ( Handle, C.void_const_ptr (Item), C.size_t (Length)); Out_Length := Ada.Streams.Stream_Element_Offset (Written_Size); if Out_Length < 0 then case C.errno.errno is when C.errno.EPIPE => Out_Length := 0; when others => null; end case; end if; end Write; procedure Flush (Handle : Handle_Type) is begin if C.unistd.fsync (Handle) < 0 then case C.errno.errno is when C.errno.EINVAL => null; -- means fd is not file but FIFO, etc. when others => Raise_Exception (Device_Error'Identity); end case; end if; end Flush; procedure Set_Relative_Index ( Handle : Handle_Type; Relative_To : Ada.Streams.Stream_Element_Offset; Whence : Whence_Type; New_Index : out Ada.Streams.Stream_Element_Offset) is Offset : C.sys.types.off_t; begin Offset := C.unistd.lseek ( Handle, C.sys.types.off_t (Relative_To), Whence); if Offset < 0 then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; New_Index := Ada.Streams.Stream_Element_Offset (Offset) + 1; end Set_Relative_Index; function Index (Handle : Handle_Type) return Ada.Streams.Stream_Element_Offset is Offset : C.sys.types.off_t; begin Offset := C.unistd.lseek (Handle, 0, C.unistd.SEEK_CUR); if Offset < 0 then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; return Ada.Streams.Stream_Element_Offset (Offset) + 1; end Index; function Size (Handle : Handle_Type) return Ada.Streams.Stream_Element_Count is Info : aliased C.sys.stat.struct_stat; begin if C.sys.stat.fstat (Handle, Info'Access) < 0 then Raise_Exception (IO_Exception_Id (C.errno.errno)); end if; return Ada.Streams.Stream_Element_Offset (Info.st_size); end Size; procedure Open_Pipe ( Reading_Handle : aliased out Handle_Type; Writing_Handle : aliased out Handle_Type) is Handles : aliased C.signed_int_array (0 .. 1); begin if C.unistd.pipe (Handles (0)'Access) < 0 then Raise_Exception (Use_Error'Identity); else Set_Close_On_Exec (Handles (0)); Set_Close_On_Exec (Handles (1)); Reading_Handle := Handles (0); Writing_Handle := Handles (1); end if; end Open_Pipe; procedure Map ( Mapping : out Mapping_Type; Handle : Handle_Type; Mode : File_Mode; Private_Copy : Boolean; Offset : Ada.Streams.Stream_Element_Offset; Size : Ada.Streams.Stream_Element_Count) is Mapped_Address : C.void_ptr; begin if Size = 0 then Mapped_Address := C.void_ptr (System'To_Address (1)); -- dummy value else declare Prot : C.unsigned_int; Flags : C.unsigned_int; Mapped_Offset : constant C.sys.types.off_t := C.sys.types.off_t (Offset) - 1; Mapped_Size : constant C.size_t := C.size_t (Size); begin if Private_Copy then Prot := C.sys.mman.PROT_READ or C.sys.mman.PROT_WRITE; Flags := C.sys.mman.MAP_FILE or C.sys.mman.MAP_PRIVATE; else if Mode = Read_Only_Mode then Prot := C.sys.mman.PROT_READ; elsif Mode = Write_Only_Mode then Prot := C.sys.mman.PROT_WRITE; -- may fail in mostly platforms else -- Read_Write_Mode Prot := C.sys.mman.PROT_READ or C.sys.mman.PROT_WRITE; end if; Flags := C.sys.mman.MAP_FILE or C.sys.mman.MAP_SHARED; end if; Mapped_Address := C.sys.mman.mmap ( C.void_ptr (Null_Address), Mapped_Size, C.signed_int (Prot), C.signed_int (Flags), Handle, Mapped_Offset); if Address (Mapped_Address) = Address (C.sys.mman.MAP_FAILED) then Raise_Exception (Use_Error'Identity); end if; end; end if; Mapping.Storage_Address := Address (Mapped_Address); Mapping.Storage_Size := Storage_Elements.Storage_Offset (Size); end Map; procedure Unmap ( Mapping : in out Mapping_Type; Raise_On_Error : Boolean) is begin if Mapping.Storage_Size > 0 then if C.sys.mman.munmap ( C.void_ptr (Mapping.Storage_Address), C.size_t (Mapping.Storage_Size)) < 0 and then Raise_On_Error then Raise_Exception (Use_Error'Identity); end if; end if; Mapping.Storage_Address := Null_Address; Mapping.Storage_Size := 0; end Unmap; function IO_Exception_Id (errno : C.signed_int) return Ada.Exception_Identification.Exception_Id is begin case errno is when C.errno.EIO => return Device_Error'Identity; when others => return Use_Error'Identity; end case; end IO_Exception_Id; end System.Native_IO;
with impact.d3.Shape.convex, impact.d3.collision.Margin; package impact.d3.Shape.convex.internal -- -- The impact.d3.Shape.convex.internal is an internal base class, shared by most convex shape implementations. -- -- The impact.d3.Shape.convex.internal uses a default collision margin set to CONVEX_DISTANCE_MARGIN. -- -- This collision margin used by Gjk and some other algorithms, see also impact.d3.collision.Margin.h -- -- Note that when creating small shapes (derived from impact.d3.Shape.convex.internal), -- you need to make sure to set a smaller collision margin, using the 'setMargin' API -- -- There is a automatic mechanism 'setSafeMargin' used by impact.d3.Shape.convex.internal.polyhedral.box and impact.d3.Shape.convex.internal.cylinder -- is type Item is abstract new impact.d3.Shape.convex.item with private; overriding function localGetSupportingVertex (Self : in Item; vec : in math.Vector_3) return math.Vector_3; function getImplicitShapeDimensions (Self : in Item) return math.Vector_3; procedure setImplicitShapeDimensions (Self : in out Item; dimensions : in math.Vector_3); -- -- -- warning: use setImplicitShapeDimensions with care -- -- changing a collision shape while the body is in the world is not recommended, -- it is best to remove the body from the world, then make the change, and re-add it -- alternatively flush the contact points, see documentation for 'cleanProxyFromPairs' procedure setSafeMargin (Self : in out Item'Class; minDimension : in math.Real; defaultMarginMultiplier : in math.Real := 0.1); procedure setSafeMargin (Self : in out Item'Class; halfExtents : in math.Vector_3; defaultMarginMultiplier : in math.Real := 0.1); overriding procedure getAabb (Self : in Item; t : in Transform_3d; aabbMin, aabbMax : out math.Vector_3); -- -- getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version overriding procedure getAabbSlow (Self : in Item; t : in Transform_3d; aabbMin, aabbMax : out math.Vector_3); overriding procedure setLocalScaling (Self : in out Item; scaling : in math.Vector_3); overriding function getLocalScaling (Self : in Item) return math.Vector_3; function getLocalScalingNV (Self : in Item) return math.Vector_3; overriding procedure setMargin (Self : in out Item; margin : in math.Real); overriding function getMargin (Self : in Item) return math.Real; function getMarginNV (Self : in Item) return math.Real; overriding function getNumPreferredPenetrationDirections (Self : in Item) return Integer; overriding procedure getPreferredPenetrationDirection (Self : in Item; Index : in Integer; penetrationVector : out math.Vector_3); --- btConvexInternalAabbCachingShape -- -- adds local aabb caching for convex shapes, to avoid expensive bounding box calculations -- type btConvexInternalAabbCachingShape is abstract new impact.d3.Shape.convex.internal.Item with private; overriding procedure setLocalScaling (Self : in out btConvexInternalAabbCachingShape; scaling : in math.Vector_3); overriding procedure getAabb (Self : in btConvexInternalAabbCachingShape; t : in Transform_3d; aabbMin, aabbMax : out math.Vector_3); procedure recalcLocalAabb (Self : in out btConvexInternalAabbCachingShape'Class); procedure set_m_localScaling (Self : out Item; To : in math.Vector_3); --- 'protected' procedure getCachedLocalAabb (Self : in btConvexInternalAabbCachingShape; aabbMin, aabbMax : out math.Vector_3); private type Item is abstract new impact.d3.Shape.convex.item with record m_localScaling : math.Vector_3 := (1.0, 1.0, 1.0); -- local scaling. collisionMargin is not scaled ! m_implicitShapeDimensions : math.Vector_3; m_collisionMargin : math.Real := impact.d3.collision.Margin.CONVEX_DISTANCE_MARGIN; m_padding : math.Real; end record; type btConvexInternalAabbCachingShape is abstract new impact.d3.Shape.convex.internal.Item with record m_localAabbMin : math.Vector_3 := (1.0, 1.0, 1.0); m_localAabbMax : math.Vector_3 := (-1.0, -1.0, -1.0); m_isLocalAabbValid : Boolean := False; end record; procedure setCachedLocalAabb (Self : in out btConvexInternalAabbCachingShape; aabbMin, aabbMax : in math.Vector_3); procedure getNonvirtualAabb (Self : in btConvexInternalAabbCachingShape'Class; trans : in Transform_3d; aabbMin, aabbMax : out math.Vector_3; margin : in math.Real); end impact.d3.Shape.convex.internal;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 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 Ada.Characters.Latin_1; with Ada.Strings.Fixed; with Orka.Logging; with Orka.Strings; with Orka.Terminals; package body Orka.Rendering.Programs.Modules is use all type Orka.Logging.Source; use all type Orka.Logging.Severity; package Messages is new Orka.Logging.Messages (Shader_Compiler); function Trim_Image (Value : Integer) return String is (Orka.Strings.Trim (Integer'Image (Value))); package L1 renames Ada.Characters.Latin_1; use Orka.Strings; procedure Log_Error_With_Source (Text, Info_Log, Message : String) is package SF renames Ada.Strings.Fixed; Extra_Rows : constant := 1; Line_Number_Padding : constant := 2; Separator : constant String := " | "; use SF; use all type Orka.Terminals.Color; use all type Orka.Terminals.Style; begin declare Log_Parts : constant Orka.Strings.String_List := Split (Info_Log, ":", 3); Message_Parts : constant String_List := Split (Trim (+Log_Parts (3)), ": ", 2); Message_Kind_Color : constant Orka.Terminals.Color := (if +Message_Parts (1) = "error" then Red elsif +Message_Parts (1) = "warning" then Yellow elsif +Message_Parts (1) = "note" then Cyan else Default); Message_Kind : constant String := Orka.Terminals.Colorize (+Message_Parts (1) & ":", Foreground => Message_Kind_Color); Message_Value : constant String := Orka.Terminals.Colorize (+Message_Parts (2), Attribute => Bold); ------------------------------------------------------------------------- Lines : constant Orka.Strings.String_List := Orka.Strings.Split (Text, "" & L1.LF); Error_Row : constant Positive := Positive'Value (+Orka.Strings.Split (+Log_Parts (2), "(", 2) (1)); First_Row : constant Positive := Positive'Max (Lines'First, Error_Row - Extra_Rows); Last_Row : constant Positive := Positive'Min (Lines'Last, Error_Row + Extra_Rows); Line_Digits : constant Positive := Trim (Last_Row'Image)'Length + Line_Number_Padding; begin Messages.Log (Error, Message); for Row_Index in First_Row .. Last_Row loop declare Row_Image : constant String := SF.Tail (Trim (Row_Index'Image), Line_Digits); Row_Image_Colorized : constant String := Orka.Terminals.Colorize (Row_Image, Attribute => Dark); Line_Image : constant String := +Lines (Row_Index); First_Index_Line : constant Natural := SF.Index_Non_Blank (Line_Image, Going => Ada.Strings.Forward); Last_Index_Line : constant Natural := SF.Index_Non_Blank (Line_Image, Going => Ada.Strings.Backward); Error_Indicator : constant String := Orka.Terminals.Colorize (Natural'Max (0, First_Index_Line - 1) * " " & (Last_Index_Line - First_Index_Line + 1) * "^", Foreground => Green, Attribute => Bold); Prefix_Image : constant String := (Row_Image'Length + Separator'Length) * " "; begin Messages.Log (Error, Row_Image_Colorized & Separator & Line_Image); if Row_Index = Error_Row then Messages.Log (Error, Prefix_Image & Error_Indicator); Messages.Log (Error, Prefix_Image & ">>> " & Message_Kind & " " & Message_Value); end if; end; end loop; end; exception when others => -- Continue if parsing Info_Log fails null; end Log_Error_With_Source; procedure Load_And_Compile (Object : in out Module; Shader_Kind : GL.Objects.Shaders.Shader_Type; Location : Resources.Locations.Location_Ptr; Path : String) is begin if Path /= "" then pragma Assert (Object.Shaders (Shader_Kind).Is_Empty); declare Shader : GL.Objects.Shaders.Shader (Kind => Shader_Kind); Source : constant Resources.Byte_Array_Pointers.Pointer := Location.Read_Data (Path); Text : String renames Resources.Convert (Source.Get); begin Shader.Set_Source (Text); Shader.Compile; if not Shader.Compile_Status then declare Log : constant String := Shader.Info_Log; Log_Parts : constant Orka.Strings.String_List := Split (Log, "" & L1.LF); begin for Part of Log_Parts loop Log_Error_With_Source (Text, +Part, "Compiling shader " & Path & " failed:"); end loop; raise Shader_Compile_Error with Path & ":" & Log; end; end if; Messages.Log (Debug, "Compiled shader " & Path); Messages.Log (Debug, " size: " & Trim_Image (Orka.Strings.Lines (Text)) & " lines (" & Trim_Image (Source.Get.Value'Length) & " bytes)"); Messages.Log (Debug, " kind: " & Shader_Kind'Image); Object.Shaders (Shader_Kind).Replace_Element (Shader); end; end if; end Load_And_Compile; procedure Set_And_Compile (Object : in out Module; Shader_Kind : GL.Objects.Shaders.Shader_Type; Source : String) is begin if Source /= "" then pragma Assert (Object.Shaders (Shader_Kind).Is_Empty); declare Shader : GL.Objects.Shaders.Shader (Kind => Shader_Kind); begin Shader.Set_Source (Source); Shader.Compile; if not Shader.Compile_Status then declare Log : constant String := Shader.Info_Log; Log_Parts : constant Orka.Strings.String_List := Split (Log, "" & L1.LF); begin for Part of Log_Parts loop Log_Error_With_Source (Source, +Part, "Compiling " & Shader_Kind'Image & " shader failed:"); end loop; raise Shader_Compile_Error with Shader_Kind'Image & ":" & Log; end; end if; Messages.Log (Debug, "Compiled string with " & Trim_Image (Source'Length) & " characters"); Messages.Log (Debug, " size: " & Trim_Image (Orka.Strings.Lines (Source)) & " lines"); Messages.Log (Debug, " kind: " & Shader_Kind'Image); Object.Shaders (Shader_Kind).Replace_Element (Shader); end; end if; end Set_And_Compile; function Create_Module_From_Sources (VS, TCS, TES, GS, FS, CS : String := "") return Module is use GL.Objects.Shaders; begin return Result : Module do Set_And_Compile (Result, Vertex_Shader, VS); Set_And_Compile (Result, Tess_Control_Shader, TCS); Set_And_Compile (Result, Tess_Evaluation_Shader, TES); Set_And_Compile (Result, Geometry_Shader, GS); Set_And_Compile (Result, Fragment_Shader, FS); Set_And_Compile (Result, Compute_Shader, CS); end return; end Create_Module_From_Sources; function Create_Module (Location : Resources.Locations.Location_Ptr; VS, TCS, TES, GS, FS, CS : String := "") return Module is use GL.Objects.Shaders; begin return Result : Module do Load_And_Compile (Result, Vertex_Shader, Location, VS); Load_And_Compile (Result, Tess_Control_Shader, Location, TCS); Load_And_Compile (Result, Tess_Evaluation_Shader, Location, TES); Load_And_Compile (Result, Geometry_Shader, Location, GS); Load_And_Compile (Result, Fragment_Shader, Location, FS); Load_And_Compile (Result, Compute_Shader, Location, CS); end return; end Create_Module; procedure Attach_Shaders (Modules : Module_Array; Program : in out Programs.Program) is use GL.Objects.Shaders; procedure Attach (Subject : Module; Stage : GL.Objects.Shaders.Shader_Type) is Holder : Shader_Holder.Holder renames Subject.Shaders (Stage); begin if not Holder.Is_Empty then Program.GL_Program.Attach (Holder.Element); end if; end Attach; begin for Module of Modules loop Attach (Module, Vertex_Shader); Attach (Module, Tess_Control_Shader); Attach (Module, Tess_Evaluation_Shader); Attach (Module, Geometry_Shader); Attach (Module, Fragment_Shader); Attach (Module, Compute_Shader); end loop; end Attach_Shaders; procedure Detach_Shaders (Modules : Module_Array; Program : Programs.Program) is use GL.Objects.Shaders; procedure Detach (Holder : Shader_Holder.Holder) is begin if not Holder.Is_Empty then Program.GL_Program.Detach (Holder.Element); end if; end Detach; begin for Module of Modules loop Detach (Module.Shaders (Vertex_Shader)); Detach (Module.Shaders (Tess_Control_Shader)); Detach (Module.Shaders (Tess_Evaluation_Shader)); Detach (Module.Shaders (Geometry_Shader)); Detach (Module.Shaders (Fragment_Shader)); Detach (Module.Shaders (Compute_Shader)); end loop; end Detach_Shaders; end Orka.Rendering.Programs.Modules;
with Basic_Test_Window; use Basic_Test_Window; with Giza.Context; use Giza.Context; with Giza.Events; use Giza.Events; with Giza.Types; use Giza.Types; with Giza.Widget.Button; with Giza.Widget.Tiles; use Giza.Widget.Tiles; use Giza.Widget; package Test_Fonts is subtype Parent is Test_Window; type Test_Fonts_Window is new Parent with private; type Test_Fonts_Window_Ref is access all Test_Fonts_Window; overriding procedure On_Init (This : in out Test_Fonts_Window); overriding procedure On_Displayed (This : in out Test_Fonts_Window) is null; overriding procedure On_Hidden (This : in out Test_Fonts_Window) is null; overriding procedure Draw (This : in out Test_Fonts_Window; Ctx : in out Giza.Context.Class; Force : Boolean := True); overriding function On_Position_Event (This : in out Test_Fonts_Window; Evt : Position_Event_Ref; Pos : Point_T) return Boolean; private type Test_Fonts_Window is new Test_Window with record Tile : aliased Tiles.Instance (3, Left_Right); Prev, Next, Boxes : aliased Button.Instance; Font_Index : Integer := 1; end record; end Test_Fonts;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E X P _ C H 3 -- -- -- -- B o d y -- -- -- -- Copyright (C) 1992-2016, 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. -- -- -- ------------------------------------------------------------------------------ with Aspects; use Aspects; with Atree; use Atree; with Checks; use Checks; with Einfo; use Einfo; with Errout; use Errout; with Exp_Aggr; use Exp_Aggr; with Exp_Atag; use Exp_Atag; with Exp_Ch4; use Exp_Ch4; with Exp_Ch6; use Exp_Ch6; with Exp_Ch7; use Exp_Ch7; with Exp_Ch9; use Exp_Ch9; with Exp_Dbug; use Exp_Dbug; with Exp_Disp; use Exp_Disp; with Exp_Dist; use Exp_Dist; with Exp_Smem; use Exp_Smem; with Exp_Strm; use Exp_Strm; with Exp_Tss; use Exp_Tss; with Exp_Util; use Exp_Util; with Freeze; use Freeze; with Ghost; use Ghost; with Namet; use Namet; with Nlists; use Nlists; with Nmake; use Nmake; with Opt; use Opt; with Restrict; use Restrict; with Rident; use Rident; with Rtsfind; use Rtsfind; with Sem; use Sem; with Sem_Aux; use Sem_Aux; with Sem_Attr; use Sem_Attr; with Sem_Cat; use Sem_Cat; with Sem_Ch3; use Sem_Ch3; with Sem_Ch6; use Sem_Ch6; with Sem_Ch8; use Sem_Ch8; with Sem_Disp; use Sem_Disp; with Sem_Eval; use Sem_Eval; with Sem_Mech; use Sem_Mech; with Sem_Res; use Sem_Res; with Sem_SCIL; use Sem_SCIL; with Sem_Type; use Sem_Type; with Sem_Util; use Sem_Util; with Sinfo; use Sinfo; with Stand; use Stand; with Snames; use Snames; with Targparm; use Targparm; with Tbuild; use Tbuild; with Ttypes; use Ttypes; with Validsw; use Validsw; package body Exp_Ch3 is ----------------------- -- Local Subprograms -- ----------------------- procedure Adjust_Discriminants (Rtype : Entity_Id); -- This is used when freezing a record type. It attempts to construct -- more restrictive subtypes for discriminants so that the max size of -- the record can be calculated more accurately. See the body of this -- procedure for details. procedure Build_Array_Init_Proc (A_Type : Entity_Id; Nod : Node_Id); -- Build initialization procedure for given array type. Nod is a node -- used for attachment of any actions required in its construction. -- It also supplies the source location used for the procedure. function Build_Discriminant_Formals (Rec_Id : Entity_Id; Use_Dl : Boolean) return List_Id; -- This function uses the discriminants of a type to build a list of -- formal parameters, used in Build_Init_Procedure among other places. -- If the flag Use_Dl is set, the list is built using the already -- defined discriminals of the type, as is the case for concurrent -- types with discriminants. Otherwise new identifiers are created, -- with the source names of the discriminants. function Build_Equivalent_Array_Aggregate (T : Entity_Id) return Node_Id; -- This function builds a static aggregate that can serve as the initial -- value for an array type whose bounds are static, and whose component -- type is a composite type that has a static equivalent aggregate. -- The equivalent array aggregate is used both for object initialization -- and for component initialization, when used in the following function. function Build_Equivalent_Record_Aggregate (T : Entity_Id) return Node_Id; -- This function builds a static aggregate that can serve as the initial -- value for a record type whose components are scalar and initialized -- with compile-time values, or arrays with similar initialization or -- defaults. When possible, initialization of an object of the type can -- be achieved by using a copy of the aggregate as an initial value, thus -- removing the implicit call that would otherwise constitute elaboration -- code. procedure Build_Record_Init_Proc (N : Node_Id; Rec_Ent : Entity_Id); -- Build record initialization procedure. N is the type declaration -- node, and Rec_Ent is the corresponding entity for the record type. procedure Build_Slice_Assignment (Typ : Entity_Id); -- Build assignment procedure for one-dimensional arrays of controlled -- types. Other array and slice assignments are expanded in-line, but -- the code expansion for controlled components (when control actions -- are active) can lead to very large blocks that GCC3 handles poorly. procedure Build_Untagged_Equality (Typ : Entity_Id); -- AI05-0123: Equality on untagged records composes. This procedure -- builds the equality routine for an untagged record that has components -- of a record type that has user-defined primitive equality operations. -- The resulting operation is a TSS subprogram. procedure Build_Variant_Record_Equality (Typ : Entity_Id); -- Create An Equality function for the untagged variant record Typ and -- attach it to the TSS list procedure Check_Stream_Attributes (Typ : Entity_Id); -- Check that if a limited extension has a parent with user-defined stream -- attributes, and does not itself have user-defined stream-attributes, -- then any limited component of the extension also has the corresponding -- user-defined stream attributes. procedure Clean_Task_Names (Typ : Entity_Id; Proc_Id : Entity_Id); -- If an initialization procedure includes calls to generate names -- for task subcomponents, indicate that secondary stack cleanup is -- needed after an initialization. Typ is the component type, and Proc_Id -- the initialization procedure for the enclosing composite type. procedure Expand_Freeze_Array_Type (N : Node_Id); -- Freeze an array type. Deals with building the initialization procedure, -- creating the packed array type for a packed array and also with the -- creation of the controlling procedures for the controlled case. The -- argument N is the N_Freeze_Entity node for the type. procedure Expand_Freeze_Class_Wide_Type (N : Node_Id); -- Freeze a class-wide type. Build routine Finalize_Address for the purpose -- of finalizing controlled derivations from the class-wide's root type. procedure Expand_Freeze_Enumeration_Type (N : Node_Id); -- Freeze enumeration type with non-standard representation. Builds the -- array and function needed to convert between enumeration pos and -- enumeration representation values. N is the N_Freeze_Entity node -- for the type. procedure Expand_Freeze_Record_Type (N : Node_Id); -- Freeze record type. Builds all necessary discriminant checking -- and other ancillary functions, and builds dispatch tables where -- needed. The argument N is the N_Freeze_Entity node. This processing -- applies only to E_Record_Type entities, not to class wide types, -- record subtypes, or private types. procedure Expand_Tagged_Root (T : Entity_Id); -- Add a field _Tag at the beginning of the record. This field carries -- the value of the access to the Dispatch table. This procedure is only -- called on root type, the _Tag field being inherited by the descendants. procedure Freeze_Stream_Operations (N : Node_Id; Typ : Entity_Id); -- Treat user-defined stream operations as renaming_as_body if the -- subprogram they rename is not frozen when the type is frozen. procedure Initialization_Warning (E : Entity_Id); -- If static elaboration of the package is requested, indicate -- when a type does meet the conditions for static initialization. If -- E is a type, it has components that have no static initialization. -- if E is an entity, its initial expression is not compile-time known. function Init_Formals (Typ : Entity_Id) return List_Id; -- This function builds the list of formals for an initialization routine. -- The first formal is always _Init with the given type. For task value -- record types and types containing tasks, three additional formals are -- added: -- -- _Master : Master_Id -- _Chain : in out Activation_Chain -- _Task_Name : String -- -- The caller must append additional entries for discriminants if required. function Inline_Init_Proc (Typ : Entity_Id) return Boolean; -- Returns true if the initialization procedure of Typ should be inlined function In_Runtime (E : Entity_Id) return Boolean; -- Check if E is defined in the RTL (in a child of Ada or System). Used -- to avoid to bring in the overhead of _Input, _Output for tagged types. function Is_User_Defined_Equality (Prim : Node_Id) return Boolean; -- Returns true if Prim is a user defined equality function function Make_Eq_Body (Typ : Entity_Id; Eq_Name : Name_Id) return Node_Id; -- Build the body of a primitive equality operation for a tagged record -- type, or in Ada 2012 for any record type that has components with a -- user-defined equality. Factored out of Predefined_Primitive_Bodies. function Make_Eq_Case (E : Entity_Id; CL : Node_Id; Discrs : Elist_Id := New_Elmt_List) return List_Id; -- Building block for variant record equality. Defined to share the code -- between the tagged and untagged case. Given a Component_List node CL, -- it generates an 'if' followed by a 'case' statement that compares all -- components of local temporaries named X and Y (that are declared as -- formals at some upper level). E provides the Sloc to be used for the -- generated code. -- -- IF E is an unchecked_union, Discrs is the list of formals created for -- the inferred discriminants of one operand. These formals are used in -- the generated case statements for each variant of the unchecked union. function Make_Eq_If (E : Entity_Id; L : List_Id) return Node_Id; -- Building block for variant record equality. Defined to share the code -- between the tagged and untagged case. Given the list of components -- (or discriminants) L, it generates a return statement that compares all -- components of local temporaries named X and Y (that are declared as -- formals at some upper level). E provides the Sloc to be used for the -- generated code. function Make_Neq_Body (Tag_Typ : Entity_Id) return Node_Id; -- Search for a renaming of the inequality dispatching primitive of -- this tagged type. If found then build and return the corresponding -- rename-as-body inequality subprogram; otherwise return Empty. procedure Make_Predefined_Primitive_Specs (Tag_Typ : Entity_Id; Predef_List : out List_Id; Renamed_Eq : out Entity_Id); -- Create a list with the specs of the predefined primitive operations. -- For tagged types that are interfaces all these primitives are defined -- abstract. -- -- The following entries are present for all tagged types, and provide -- the results of the corresponding attribute applied to the object. -- Dispatching is required in general, since the result of the attribute -- will vary with the actual object subtype. -- -- _size provides result of 'Size attribute -- typSR provides result of 'Read attribute -- typSW provides result of 'Write attribute -- typSI provides result of 'Input attribute -- typSO provides result of 'Output attribute -- -- The following entries are additionally present for non-limited tagged -- types, and implement additional dispatching operations for predefined -- operations: -- -- _equality implements "=" operator -- _assign implements assignment operation -- typDF implements deep finalization -- typDA implements deep adjust -- -- The latter two are empty procedures unless the type contains some -- controlled components that require finalization actions (the deep -- in the name refers to the fact that the action applies to components). -- -- The list is returned in Predef_List. The Parameter Renamed_Eq either -- returns the value Empty, or else the defining unit name for the -- predefined equality function in the case where the type has a primitive -- operation that is a renaming of predefined equality (but only if there -- is also an overriding user-defined equality function). The returned -- Renamed_Eq will be passed to the corresponding parameter of -- Predefined_Primitive_Bodies. function Has_New_Non_Standard_Rep (T : Entity_Id) return Boolean; -- Returns True if there are representation clauses for type T that are not -- inherited. If the result is false, the init_proc and the discriminant -- checking functions of the parent can be reused by a derived type. procedure Make_Controlling_Function_Wrappers (Tag_Typ : Entity_Id; Decl_List : out List_Id; Body_List : out List_Id); -- Ada 2005 (AI-391): Makes specs and bodies for the wrapper functions -- associated with inherited functions with controlling results which -- are not overridden. The body of each wrapper function consists solely -- of a return statement whose expression is an extension aggregate -- invoking the inherited subprogram's parent subprogram and extended -- with a null association list. function Make_Null_Procedure_Specs (Tag_Typ : Entity_Id) return List_Id; -- Ada 2005 (AI-251): Makes specs for null procedures associated with any -- null procedures inherited from an interface type that have not been -- overridden. Only one null procedure will be created for a given set of -- inherited null procedures with homographic profiles. function Predef_Spec_Or_Body (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : Name_Id; Profile : List_Id; Ret_Type : Entity_Id := Empty; For_Body : Boolean := False) return Node_Id; -- This function generates the appropriate expansion for a predefined -- primitive operation specified by its name, parameter profile and -- return type (Empty means this is a procedure). If For_Body is false, -- then the returned node is a subprogram declaration. If For_Body is -- true, then the returned node is a empty subprogram body containing -- no declarations and no statements. function Predef_Stream_Attr_Spec (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : TSS_Name_Type; For_Body : Boolean := False) return Node_Id; -- Specialized version of Predef_Spec_Or_Body that apply to read, write, -- input and output attribute whose specs are constructed in Exp_Strm. function Predef_Deep_Spec (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : TSS_Name_Type; For_Body : Boolean := False) return Node_Id; -- Specialized version of Predef_Spec_Or_Body that apply to _deep_adjust -- and _deep_finalize function Predefined_Primitive_Bodies (Tag_Typ : Entity_Id; Renamed_Eq : Entity_Id) return List_Id; -- Create the bodies of the predefined primitives that are described in -- Predefined_Primitive_Specs. When not empty, Renamed_Eq must denote -- the defining unit name of the type's predefined equality as returned -- by Make_Predefined_Primitive_Specs. function Predefined_Primitive_Freeze (Tag_Typ : Entity_Id) return List_Id; -- Freeze entities of all predefined primitive operations. This is needed -- because the bodies of these operations do not normally do any freezing. function Stream_Operation_OK (Typ : Entity_Id; Operation : TSS_Name_Type) return Boolean; -- Check whether the named stream operation must be emitted for a given -- type. The rules for inheritance of stream attributes by type extensions -- are enforced by this function. Furthermore, various restrictions prevent -- the generation of these operations, as a useful optimization or for -- certification purposes and to save unnecessary generated code. -------------------------- -- Adjust_Discriminants -- -------------------------- -- This procedure attempts to define subtypes for discriminants that are -- more restrictive than those declared. Such a replacement is possible if -- we can demonstrate that values outside the restricted range would cause -- constraint errors in any case. The advantage of restricting the -- discriminant types in this way is that the maximum size of the variant -- record can be calculated more conservatively. -- An example of a situation in which we can perform this type of -- restriction is the following: -- subtype B is range 1 .. 10; -- type Q is array (B range <>) of Integer; -- type V (N : Natural) is record -- C : Q (1 .. N); -- end record; -- In this situation, we can restrict the upper bound of N to 10, since -- any larger value would cause a constraint error in any case. -- There are many situations in which such restriction is possible, but -- for now, we just look for cases like the above, where the component -- in question is a one dimensional array whose upper bound is one of -- the record discriminants. Also the component must not be part of -- any variant part, since then the component does not always exist. procedure Adjust_Discriminants (Rtype : Entity_Id) is Loc : constant Source_Ptr := Sloc (Rtype); Comp : Entity_Id; Ctyp : Entity_Id; Ityp : Entity_Id; Lo : Node_Id; Hi : Node_Id; P : Node_Id; Loval : Uint; Discr : Entity_Id; Dtyp : Entity_Id; Dhi : Node_Id; Dhiv : Uint; Ahi : Node_Id; Ahiv : Uint; Tnn : Entity_Id; begin Comp := First_Component (Rtype); while Present (Comp) loop -- If our parent is a variant, quit, we do not look at components -- that are in variant parts, because they may not always exist. P := Parent (Comp); -- component declaration P := Parent (P); -- component list exit when Nkind (Parent (P)) = N_Variant; -- We are looking for a one dimensional array type Ctyp := Etype (Comp); if not Is_Array_Type (Ctyp) or else Number_Dimensions (Ctyp) > 1 then goto Continue; end if; -- The lower bound must be constant, and the upper bound is a -- discriminant (which is a discriminant of the current record). Ityp := Etype (First_Index (Ctyp)); Lo := Type_Low_Bound (Ityp); Hi := Type_High_Bound (Ityp); if not Compile_Time_Known_Value (Lo) or else Nkind (Hi) /= N_Identifier or else No (Entity (Hi)) or else Ekind (Entity (Hi)) /= E_Discriminant then goto Continue; end if; -- We have an array with appropriate bounds Loval := Expr_Value (Lo); Discr := Entity (Hi); Dtyp := Etype (Discr); -- See if the discriminant has a known upper bound Dhi := Type_High_Bound (Dtyp); if not Compile_Time_Known_Value (Dhi) then goto Continue; end if; Dhiv := Expr_Value (Dhi); -- See if base type of component array has known upper bound Ahi := Type_High_Bound (Etype (First_Index (Base_Type (Ctyp)))); if not Compile_Time_Known_Value (Ahi) then goto Continue; end if; Ahiv := Expr_Value (Ahi); -- The condition for doing the restriction is that the high bound -- of the discriminant is greater than the low bound of the array, -- and is also greater than the high bound of the base type index. if Dhiv > Loval and then Dhiv > Ahiv then -- We can reset the upper bound of the discriminant type to -- whichever is larger, the low bound of the component, or -- the high bound of the base type array index. -- We build a subtype that is declared as -- subtype Tnn is discr_type range discr_type'First .. max; -- And insert this declaration into the tree. The type of the -- discriminant is then reset to this more restricted subtype. Tnn := Make_Temporary (Loc, 'T'); Insert_Action (Declaration_Node (Rtype), Make_Subtype_Declaration (Loc, Defining_Identifier => Tnn, Subtype_Indication => Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (Dtyp, Loc), Constraint => Make_Range_Constraint (Loc, Range_Expression => Make_Range (Loc, Low_Bound => Make_Attribute_Reference (Loc, Attribute_Name => Name_First, Prefix => New_Occurrence_Of (Dtyp, Loc)), High_Bound => Make_Integer_Literal (Loc, Intval => UI_Max (Loval, Ahiv))))))); Set_Etype (Discr, Tnn); end if; <<Continue>> Next_Component (Comp); end loop; end Adjust_Discriminants; --------------------------- -- Build_Array_Init_Proc -- --------------------------- procedure Build_Array_Init_Proc (A_Type : Entity_Id; Nod : Node_Id) is Comp_Type : constant Entity_Id := Component_Type (A_Type); Body_Stmts : List_Id; Has_Default_Init : Boolean; Index_List : List_Id; Loc : Source_Ptr; Proc_Id : Entity_Id; function Init_Component return List_Id; -- Create one statement to initialize one array component, designated -- by a full set of indexes. function Init_One_Dimension (N : Int) return List_Id; -- Create loop to initialize one dimension of the array. The single -- statement in the loop body initializes the inner dimensions if any, -- or else the single component. Note that this procedure is called -- recursively, with N being the dimension to be initialized. A call -- with N greater than the number of dimensions simply generates the -- component initialization, terminating the recursion. -------------------- -- Init_Component -- -------------------- function Init_Component return List_Id is Comp : Node_Id; begin Comp := Make_Indexed_Component (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Expressions => Index_List); if Has_Default_Aspect (A_Type) then Set_Assignment_OK (Comp); return New_List ( Make_Assignment_Statement (Loc, Name => Comp, Expression => Convert_To (Comp_Type, Default_Aspect_Component_Value (First_Subtype (A_Type))))); elsif Needs_Simple_Initialization (Comp_Type) then Set_Assignment_OK (Comp); return New_List ( Make_Assignment_Statement (Loc, Name => Comp, Expression => Get_Simple_Init_Val (Comp_Type, Nod, Component_Size (A_Type)))); else Clean_Task_Names (Comp_Type, Proc_Id); return Build_Initialization_Call (Loc, Comp, Comp_Type, In_Init_Proc => True, Enclos_Type => A_Type); end if; end Init_Component; ------------------------ -- Init_One_Dimension -- ------------------------ function Init_One_Dimension (N : Int) return List_Id is Index : Entity_Id; begin -- If the component does not need initializing, then there is nothing -- to do here, so we return a null body. This occurs when generating -- the dummy Init_Proc needed for Initialize_Scalars processing. if not Has_Non_Null_Base_Init_Proc (Comp_Type) and then not Needs_Simple_Initialization (Comp_Type) and then not Has_Task (Comp_Type) and then not Has_Default_Aspect (A_Type) then return New_List (Make_Null_Statement (Loc)); -- If all dimensions dealt with, we simply initialize the component elsif N > Number_Dimensions (A_Type) then return Init_Component; -- Here we generate the required loop else Index := Make_Defining_Identifier (Loc, New_External_Name ('J', N)); Append (New_Occurrence_Of (Index, Loc), Index_List); return New_List ( Make_Implicit_Loop_Statement (Nod, Identifier => Empty, Iteration_Scheme => Make_Iteration_Scheme (Loc, Loop_Parameter_Specification => Make_Loop_Parameter_Specification (Loc, Defining_Identifier => Index, Discrete_Subtype_Definition => Make_Attribute_Reference (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Attribute_Name => Name_Range, Expressions => New_List ( Make_Integer_Literal (Loc, N))))), Statements => Init_One_Dimension (N + 1))); end if; end Init_One_Dimension; -- Start of processing for Build_Array_Init_Proc begin -- The init proc is created when analyzing the freeze node for the type, -- but it properly belongs with the array type declaration. However, if -- the freeze node is for a subtype of a type declared in another unit -- it seems preferable to use the freeze node as the source location of -- the init proc. In any case this is preferable for gcov usage, and -- the Sloc is not otherwise used by the compiler. if In_Open_Scopes (Scope (A_Type)) then Loc := Sloc (A_Type); else Loc := Sloc (Nod); end if; -- Nothing to generate in the following cases: -- 1. Initialization is suppressed for the type -- 2. An initialization already exists for the base type if Initialization_Suppressed (A_Type) or else Present (Base_Init_Proc (A_Type)) then return; end if; Index_List := New_List; -- We need an initialization procedure if any of the following is true: -- 1. The component type has an initialization procedure -- 2. The component type needs simple initialization -- 3. Tasks are present -- 4. The type is marked as a public entity -- 5. The array type has a Default_Component_Value aspect -- The reason for the public entity test is to deal properly with the -- Initialize_Scalars pragma. This pragma can be set in the client and -- not in the declaring package, this means the client will make a call -- to the initialization procedure (because one of conditions 1-3 must -- apply in this case), and we must generate a procedure (even if it is -- null) to satisfy the call in this case. -- Exception: do not build an array init_proc for a type whose root -- type is Standard.String or Standard.Wide_[Wide_]String, since there -- is no place to put the code, and in any case we handle initialization -- of such types (in the Initialize_Scalars case, that's the only time -- the issue arises) in a special manner anyway which does not need an -- init_proc. Has_Default_Init := Has_Non_Null_Base_Init_Proc (Comp_Type) or else Needs_Simple_Initialization (Comp_Type) or else Has_Task (Comp_Type) or else Has_Default_Aspect (A_Type); if Has_Default_Init or else (not Restriction_Active (No_Initialize_Scalars) and then Is_Public (A_Type) and then not Is_Standard_String_Type (A_Type)) then Proc_Id := Make_Defining_Identifier (Loc, Chars => Make_Init_Proc_Name (A_Type)); -- If No_Default_Initialization restriction is active, then we don't -- want to build an init_proc, but we need to mark that an init_proc -- would be needed if this restriction was not active (so that we can -- detect attempts to call it), so set a dummy init_proc in place. -- This is only done though when actual default initialization is -- needed (and not done when only Is_Public is True), since otherwise -- objects such as arrays of scalars could be wrongly flagged as -- violating the restriction. if Restriction_Active (No_Default_Initialization) then if Has_Default_Init then Set_Init_Proc (A_Type, Proc_Id); end if; return; end if; Body_Stmts := Init_One_Dimension (1); Discard_Node ( Make_Subprogram_Body (Loc, Specification => Make_Procedure_Specification (Loc, Defining_Unit_Name => Proc_Id, Parameter_Specifications => Init_Formals (A_Type)), Declarations => New_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => Body_Stmts))); Set_Ekind (Proc_Id, E_Procedure); Set_Is_Public (Proc_Id, Is_Public (A_Type)); Set_Is_Internal (Proc_Id); Set_Has_Completion (Proc_Id); if not Debug_Generated_Code then Set_Debug_Info_Off (Proc_Id); end if; -- Set Inlined on Init_Proc if it is set on the Init_Proc of the -- component type itself (see also Build_Record_Init_Proc). Set_Is_Inlined (Proc_Id, Inline_Init_Proc (Comp_Type)); -- Associate Init_Proc with type, and determine if the procedure -- is null (happens because of the Initialize_Scalars pragma case, -- where we have to generate a null procedure in case it is called -- by a client with Initialize_Scalars set). Such procedures have -- to be generated, but do not have to be called, so we mark them -- as null to suppress the call. Set_Init_Proc (A_Type, Proc_Id); if List_Length (Body_Stmts) = 1 -- We must skip SCIL nodes because they may have been added to this -- list by Insert_Actions. and then Nkind (First_Non_SCIL_Node (Body_Stmts)) = N_Null_Statement then Set_Is_Null_Init_Proc (Proc_Id); else -- Try to build a static aggregate to statically initialize -- objects of the type. This can only be done for constrained -- one-dimensional arrays with static bounds. Set_Static_Initialization (Proc_Id, Build_Equivalent_Array_Aggregate (First_Subtype (A_Type))); end if; end if; end Build_Array_Init_Proc; -------------------------------- -- Build_Discr_Checking_Funcs -- -------------------------------- procedure Build_Discr_Checking_Funcs (N : Node_Id) is Rec_Id : Entity_Id; Loc : Source_Ptr; Enclosing_Func_Id : Entity_Id; Sequence : Nat := 1; Type_Def : Node_Id; V : Node_Id; function Build_Case_Statement (Case_Id : Entity_Id; Variant : Node_Id) return Node_Id; -- Build a case statement containing only two alternatives. The first -- alternative corresponds exactly to the discrete choices given on the -- variant with contains the components that we are generating the -- checks for. If the discriminant is one of these return False. The -- second alternative is an OTHERS choice that will return True -- indicating the discriminant did not match. function Build_Dcheck_Function (Case_Id : Entity_Id; Variant : Node_Id) return Entity_Id; -- Build the discriminant checking function for a given variant procedure Build_Dcheck_Functions (Variant_Part_Node : Node_Id); -- Builds the discriminant checking function for each variant of the -- given variant part of the record type. -------------------------- -- Build_Case_Statement -- -------------------------- function Build_Case_Statement (Case_Id : Entity_Id; Variant : Node_Id) return Node_Id is Alt_List : constant List_Id := New_List; Actuals_List : List_Id; Case_Node : Node_Id; Case_Alt_Node : Node_Id; Choice : Node_Id; Choice_List : List_Id; D : Entity_Id; Return_Node : Node_Id; begin Case_Node := New_Node (N_Case_Statement, Loc); -- Replace the discriminant which controls the variant with the name -- of the formal of the checking function. Set_Expression (Case_Node, Make_Identifier (Loc, Chars (Case_Id))); Choice := First (Discrete_Choices (Variant)); if Nkind (Choice) = N_Others_Choice then Choice_List := New_Copy_List (Others_Discrete_Choices (Choice)); else Choice_List := New_Copy_List (Discrete_Choices (Variant)); end if; if not Is_Empty_List (Choice_List) then Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Loc); Set_Discrete_Choices (Case_Alt_Node, Choice_List); -- In case this is a nested variant, we need to return the result -- of the discriminant checking function for the immediately -- enclosing variant. if Present (Enclosing_Func_Id) then Actuals_List := New_List; D := First_Discriminant (Rec_Id); while Present (D) loop Append (Make_Identifier (Loc, Chars (D)), Actuals_List); Next_Discriminant (D); end loop; Return_Node := Make_Simple_Return_Statement (Loc, Expression => Make_Function_Call (Loc, Name => New_Occurrence_Of (Enclosing_Func_Id, Loc), Parameter_Associations => Actuals_List)); else Return_Node := Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_False, Loc)); end if; Set_Statements (Case_Alt_Node, New_List (Return_Node)); Append (Case_Alt_Node, Alt_List); end if; Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Loc); Choice_List := New_List (New_Node (N_Others_Choice, Loc)); Set_Discrete_Choices (Case_Alt_Node, Choice_List); Return_Node := Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_True, Loc)); Set_Statements (Case_Alt_Node, New_List (Return_Node)); Append (Case_Alt_Node, Alt_List); Set_Alternatives (Case_Node, Alt_List); return Case_Node; end Build_Case_Statement; --------------------------- -- Build_Dcheck_Function -- --------------------------- function Build_Dcheck_Function (Case_Id : Entity_Id; Variant : Node_Id) return Entity_Id is Body_Node : Node_Id; Func_Id : Entity_Id; Parameter_List : List_Id; Spec_Node : Node_Id; begin Body_Node := New_Node (N_Subprogram_Body, Loc); Sequence := Sequence + 1; Func_Id := Make_Defining_Identifier (Loc, Chars => New_External_Name (Chars (Rec_Id), 'D', Sequence)); Set_Is_Discriminant_Check_Function (Func_Id); Spec_Node := New_Node (N_Function_Specification, Loc); Set_Defining_Unit_Name (Spec_Node, Func_Id); Parameter_List := Build_Discriminant_Formals (Rec_Id, False); Set_Parameter_Specifications (Spec_Node, Parameter_List); Set_Result_Definition (Spec_Node, New_Occurrence_Of (Standard_Boolean, Loc)); Set_Specification (Body_Node, Spec_Node); Set_Declarations (Body_Node, New_List); Set_Handled_Statement_Sequence (Body_Node, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Build_Case_Statement (Case_Id, Variant)))); Set_Ekind (Func_Id, E_Function); Set_Mechanism (Func_Id, Default_Mechanism); Set_Is_Inlined (Func_Id, True); Set_Is_Pure (Func_Id, True); Set_Is_Public (Func_Id, Is_Public (Rec_Id)); Set_Is_Internal (Func_Id, True); if not Debug_Generated_Code then Set_Debug_Info_Off (Func_Id); end if; Analyze (Body_Node); Append_Freeze_Action (Rec_Id, Body_Node); Set_Dcheck_Function (Variant, Func_Id); return Func_Id; end Build_Dcheck_Function; ---------------------------- -- Build_Dcheck_Functions -- ---------------------------- procedure Build_Dcheck_Functions (Variant_Part_Node : Node_Id) is Component_List_Node : Node_Id; Decl : Entity_Id; Discr_Name : Entity_Id; Func_Id : Entity_Id; Variant : Node_Id; Saved_Enclosing_Func_Id : Entity_Id; begin -- Build the discriminant-checking function for each variant, and -- label all components of that variant with the function's name. -- We only Generate a discriminant-checking function when the -- variant is not empty, to prevent the creation of dead code. -- The exception to that is when Frontend_Layout_On_Target is set, -- because the variant record size function generated in package -- Layout needs to generate calls to all discriminant-checking -- functions, including those for empty variants. Discr_Name := Entity (Name (Variant_Part_Node)); Variant := First_Non_Pragma (Variants (Variant_Part_Node)); while Present (Variant) loop Component_List_Node := Component_List (Variant); if not Null_Present (Component_List_Node) or else Frontend_Layout_On_Target then Func_Id := Build_Dcheck_Function (Discr_Name, Variant); Decl := First_Non_Pragma (Component_Items (Component_List_Node)); while Present (Decl) loop Set_Discriminant_Checking_Func (Defining_Identifier (Decl), Func_Id); Next_Non_Pragma (Decl); end loop; if Present (Variant_Part (Component_List_Node)) then Saved_Enclosing_Func_Id := Enclosing_Func_Id; Enclosing_Func_Id := Func_Id; Build_Dcheck_Functions (Variant_Part (Component_List_Node)); Enclosing_Func_Id := Saved_Enclosing_Func_Id; end if; end if; Next_Non_Pragma (Variant); end loop; end Build_Dcheck_Functions; -- Start of processing for Build_Discr_Checking_Funcs begin -- Only build if not done already if not Discr_Check_Funcs_Built (N) then Type_Def := Type_Definition (N); if Nkind (Type_Def) = N_Record_Definition then if No (Component_List (Type_Def)) then -- null record. return; else V := Variant_Part (Component_List (Type_Def)); end if; else pragma Assert (Nkind (Type_Def) = N_Derived_Type_Definition); if No (Component_List (Record_Extension_Part (Type_Def))) then return; else V := Variant_Part (Component_List (Record_Extension_Part (Type_Def))); end if; end if; Rec_Id := Defining_Identifier (N); if Present (V) and then not Is_Unchecked_Union (Rec_Id) then Loc := Sloc (N); Enclosing_Func_Id := Empty; Build_Dcheck_Functions (V); end if; Set_Discr_Check_Funcs_Built (N); end if; end Build_Discr_Checking_Funcs; -------------------------------- -- Build_Discriminant_Formals -- -------------------------------- function Build_Discriminant_Formals (Rec_Id : Entity_Id; Use_Dl : Boolean) return List_Id is Loc : Source_Ptr := Sloc (Rec_Id); Parameter_List : constant List_Id := New_List; D : Entity_Id; Formal : Entity_Id; Formal_Type : Entity_Id; Param_Spec_Node : Node_Id; begin if Has_Discriminants (Rec_Id) then D := First_Discriminant (Rec_Id); while Present (D) loop Loc := Sloc (D); if Use_Dl then Formal := Discriminal (D); Formal_Type := Etype (Formal); else Formal := Make_Defining_Identifier (Loc, Chars (D)); Formal_Type := Etype (D); end if; Param_Spec_Node := Make_Parameter_Specification (Loc, Defining_Identifier => Formal, Parameter_Type => New_Occurrence_Of (Formal_Type, Loc)); Append (Param_Spec_Node, Parameter_List); Next_Discriminant (D); end loop; end if; return Parameter_List; end Build_Discriminant_Formals; -------------------------------------- -- Build_Equivalent_Array_Aggregate -- -------------------------------------- function Build_Equivalent_Array_Aggregate (T : Entity_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (T); Comp_Type : constant Entity_Id := Component_Type (T); Index_Type : constant Entity_Id := Etype (First_Index (T)); Proc : constant Entity_Id := Base_Init_Proc (T); Lo, Hi : Node_Id; Aggr : Node_Id; Expr : Node_Id; begin if not Is_Constrained (T) or else Number_Dimensions (T) > 1 or else No (Proc) then Initialization_Warning (T); return Empty; end if; Lo := Type_Low_Bound (Index_Type); Hi := Type_High_Bound (Index_Type); if not Compile_Time_Known_Value (Lo) or else not Compile_Time_Known_Value (Hi) then Initialization_Warning (T); return Empty; end if; if Is_Record_Type (Comp_Type) and then Present (Base_Init_Proc (Comp_Type)) then Expr := Static_Initialization (Base_Init_Proc (Comp_Type)); if No (Expr) then Initialization_Warning (T); return Empty; end if; else Initialization_Warning (T); return Empty; end if; Aggr := Make_Aggregate (Loc, No_List, New_List); Set_Etype (Aggr, T); Set_Aggregate_Bounds (Aggr, Make_Range (Loc, Low_Bound => New_Copy (Lo), High_Bound => New_Copy (Hi))); Set_Parent (Aggr, Parent (Proc)); Append_To (Component_Associations (Aggr), Make_Component_Association (Loc, Choices => New_List ( Make_Range (Loc, Low_Bound => New_Copy (Lo), High_Bound => New_Copy (Hi))), Expression => Expr)); if Static_Array_Aggregate (Aggr) then return Aggr; else Initialization_Warning (T); return Empty; end if; end Build_Equivalent_Array_Aggregate; --------------------------------------- -- Build_Equivalent_Record_Aggregate -- --------------------------------------- function Build_Equivalent_Record_Aggregate (T : Entity_Id) return Node_Id is Agg : Node_Id; Comp : Entity_Id; Comp_Type : Entity_Id; -- Start of processing for Build_Equivalent_Record_Aggregate begin if not Is_Record_Type (T) or else Has_Discriminants (T) or else Is_Limited_Type (T) or else Has_Non_Standard_Rep (T) then Initialization_Warning (T); return Empty; end if; Comp := First_Component (T); -- A null record needs no warning if No (Comp) then return Empty; end if; while Present (Comp) loop -- Array components are acceptable if initialized by a positional -- aggregate with static components. if Is_Array_Type (Etype (Comp)) then Comp_Type := Component_Type (Etype (Comp)); if Nkind (Parent (Comp)) /= N_Component_Declaration or else No (Expression (Parent (Comp))) or else Nkind (Expression (Parent (Comp))) /= N_Aggregate then Initialization_Warning (T); return Empty; elsif Is_Scalar_Type (Component_Type (Etype (Comp))) and then (not Compile_Time_Known_Value (Type_Low_Bound (Comp_Type)) or else not Compile_Time_Known_Value (Type_High_Bound (Comp_Type))) then Initialization_Warning (T); return Empty; elsif not Static_Array_Aggregate (Expression (Parent (Comp))) then Initialization_Warning (T); return Empty; end if; elsif Is_Scalar_Type (Etype (Comp)) then Comp_Type := Etype (Comp); if Nkind (Parent (Comp)) /= N_Component_Declaration or else No (Expression (Parent (Comp))) or else not Compile_Time_Known_Value (Expression (Parent (Comp))) or else not Compile_Time_Known_Value (Type_Low_Bound (Comp_Type)) or else not Compile_Time_Known_Value (Type_High_Bound (Comp_Type)) then Initialization_Warning (T); return Empty; end if; -- For now, other types are excluded else Initialization_Warning (T); return Empty; end if; Next_Component (Comp); end loop; -- All components have static initialization. Build positional aggregate -- from the given expressions or defaults. Agg := Make_Aggregate (Sloc (T), New_List, New_List); Set_Parent (Agg, Parent (T)); Comp := First_Component (T); while Present (Comp) loop Append (New_Copy_Tree (Expression (Parent (Comp))), Expressions (Agg)); Next_Component (Comp); end loop; Analyze_And_Resolve (Agg, T); return Agg; end Build_Equivalent_Record_Aggregate; ------------------------------- -- Build_Initialization_Call -- ------------------------------- -- References to a discriminant inside the record type declaration can -- appear either in the subtype_indication to constrain a record or an -- array, or as part of a larger expression given for the initial value -- of a component. In both of these cases N appears in the record -- initialization procedure and needs to be replaced by the formal -- parameter of the initialization procedure which corresponds to that -- discriminant. -- In the example below, references to discriminants D1 and D2 in proc_1 -- are replaced by references to formals with the same name -- (discriminals) -- A similar replacement is done for calls to any record initialization -- procedure for any components that are themselves of a record type. -- type R (D1, D2 : Integer) is record -- X : Integer := F * D1; -- Y : Integer := F * D2; -- end record; -- procedure proc_1 (Out_2 : out R; D1 : Integer; D2 : Integer) is -- begin -- Out_2.D1 := D1; -- Out_2.D2 := D2; -- Out_2.X := F * D1; -- Out_2.Y := F * D2; -- end; function Build_Initialization_Call (Loc : Source_Ptr; Id_Ref : Node_Id; Typ : Entity_Id; In_Init_Proc : Boolean := False; Enclos_Type : Entity_Id := Empty; Discr_Map : Elist_Id := New_Elmt_List; With_Default_Init : Boolean := False; Constructor_Ref : Node_Id := Empty) return List_Id is Res : constant List_Id := New_List; Full_Type : Entity_Id; procedure Check_Predicated_Discriminant (Val : Node_Id; Discr : Entity_Id); -- Discriminants whose subtypes have predicates are checked in two -- cases: -- a) When an object is default-initialized and assertions are enabled -- we check that the value of the discriminant obeys the predicate. -- b) In all cases, if the discriminant controls a variant and the -- variant has no others_choice, Constraint_Error must be raised if -- the predicate is violated, because there is no variant covered -- by the illegal discriminant value. ----------------------------------- -- Check_Predicated_Discriminant -- ----------------------------------- procedure Check_Predicated_Discriminant (Val : Node_Id; Discr : Entity_Id) is Typ : constant Entity_Id := Etype (Discr); procedure Check_Missing_Others (V : Node_Id); -- ??? -------------------------- -- Check_Missing_Others -- -------------------------- procedure Check_Missing_Others (V : Node_Id) is Alt : Node_Id; Choice : Node_Id; Last_Var : Node_Id; begin Last_Var := Last_Non_Pragma (Variants (V)); Choice := First (Discrete_Choices (Last_Var)); -- An others_choice is added during expansion for gcc use, but -- does not cover the illegality. if Entity (Name (V)) = Discr then if Present (Choice) and then (Nkind (Choice) /= N_Others_Choice or else not Comes_From_Source (Choice)) then Check_Expression_Against_Static_Predicate (Val, Typ); if not Is_Static_Expression (Val) then Prepend_To (Res, Make_Raise_Constraint_Error (Loc, Condition => Make_Op_Not (Loc, Right_Opnd => Make_Predicate_Call (Typ, Val)), Reason => CE_Invalid_Data)); end if; end if; end if; -- Check whether some nested variant is ruled by the predicated -- discriminant. Alt := First (Variants (V)); while Present (Alt) loop if Nkind (Alt) = N_Variant and then Present (Variant_Part (Component_List (Alt))) then Check_Missing_Others (Variant_Part (Component_List (Alt))); end if; Next (Alt); end loop; end Check_Missing_Others; -- Local variables Def : Node_Id; -- Start of processing for Check_Predicated_Discriminant begin if Ekind (Base_Type (Full_Type)) = E_Record_Type then Def := Type_Definition (Parent (Base_Type (Full_Type))); else return; end if; if Policy_In_Effect (Name_Assert) = Name_Check and then not Predicates_Ignored (Etype (Discr)) then Prepend_To (Res, Make_Predicate_Check (Typ, Val)); end if; -- If discriminant controls a variant, verify that predicate is -- obeyed or else an Others_Choice is present. if Nkind (Def) = N_Record_Definition and then Present (Variant_Part (Component_List (Def))) and then Policy_In_Effect (Name_Assert) = Name_Ignore then Check_Missing_Others (Variant_Part (Component_List (Def))); end if; end Check_Predicated_Discriminant; -- Local variables Arg : Node_Id; Args : List_Id; Decls : List_Id; Decl : Node_Id; Discr : Entity_Id; First_Arg : Node_Id; Full_Init_Type : Entity_Id; Init_Call : Node_Id; Init_Type : Entity_Id; Proc : Entity_Id; -- Start of processing for Build_Initialization_Call begin pragma Assert (Constructor_Ref = Empty or else Is_CPP_Constructor_Call (Constructor_Ref)); if No (Constructor_Ref) then Proc := Base_Init_Proc (Typ); else Proc := Base_Init_Proc (Typ, Entity (Name (Constructor_Ref))); end if; pragma Assert (Present (Proc)); Init_Type := Etype (First_Formal (Proc)); Full_Init_Type := Underlying_Type (Init_Type); -- Nothing to do if the Init_Proc is null, unless Initialize_Scalars -- is active (in which case we make the call anyway, since in the -- actual compiled client it may be non null). if Is_Null_Init_Proc (Proc) and then not Init_Or_Norm_Scalars then return Empty_List; end if; -- Use the [underlying] full view when dealing with a private type. This -- may require several steps depending on derivations. Full_Type := Typ; loop if Is_Private_Type (Full_Type) then if Present (Full_View (Full_Type)) then Full_Type := Full_View (Full_Type); elsif Present (Underlying_Full_View (Full_Type)) then Full_Type := Underlying_Full_View (Full_Type); -- When a private type acts as a generic actual and lacks a full -- view, use the base type. elsif Is_Generic_Actual_Type (Full_Type) then Full_Type := Base_Type (Full_Type); -- The loop has recovered the [underlying] full view, stop the -- traversal. else exit; end if; -- The type is not private, nothing to do else exit; end if; end loop; -- If Typ is derived, the procedure is the initialization procedure for -- the root type. Wrap the argument in an conversion to make it type -- honest. Actually it isn't quite type honest, because there can be -- conflicts of views in the private type case. That is why we set -- Conversion_OK in the conversion node. if (Is_Record_Type (Typ) or else Is_Array_Type (Typ) or else Is_Private_Type (Typ)) and then Init_Type /= Base_Type (Typ) then First_Arg := OK_Convert_To (Etype (Init_Type), Id_Ref); Set_Etype (First_Arg, Init_Type); else First_Arg := Id_Ref; end if; Args := New_List (Convert_Concurrent (First_Arg, Typ)); -- In the tasks case, add _Master as the value of the _Master parameter -- and _Chain as the value of the _Chain parameter. At the outer level, -- these will be variables holding the corresponding values obtained -- from GNARL. At inner levels, they will be the parameters passed down -- through the outer routines. if Has_Task (Full_Type) then if Restriction_Active (No_Task_Hierarchy) then Append_To (Args, New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc)); else Append_To (Args, Make_Identifier (Loc, Name_uMaster)); end if; -- Add _Chain (not done for sequential elaboration policy, see -- comment for Create_Restricted_Task_Sequential in s-tarest.ads). if Partition_Elaboration_Policy /= 'S' then Append_To (Args, Make_Identifier (Loc, Name_uChain)); end if; -- Ada 2005 (AI-287): In case of default initialized components -- with tasks, we generate a null string actual parameter. -- This is just a workaround that must be improved later??? if With_Default_Init then Append_To (Args, Make_String_Literal (Loc, Strval => "")); else Decls := Build_Task_Image_Decls (Loc, Id_Ref, Enclos_Type, In_Init_Proc); Decl := Last (Decls); Append_To (Args, New_Occurrence_Of (Defining_Identifier (Decl), Loc)); Append_List (Decls, Res); end if; else Decls := No_List; Decl := Empty; end if; -- Add discriminant values if discriminants are present if Has_Discriminants (Full_Init_Type) then Discr := First_Discriminant (Full_Init_Type); while Present (Discr) loop -- If this is a discriminated concurrent type, the init_proc -- for the corresponding record is being called. Use that type -- directly to find the discriminant value, to handle properly -- intervening renamed discriminants. declare T : Entity_Id := Full_Type; begin if Is_Protected_Type (T) then T := Corresponding_Record_Type (T); end if; Arg := Get_Discriminant_Value ( Discr, T, Discriminant_Constraint (Full_Type)); end; -- If the target has access discriminants, and is constrained by -- an access to the enclosing construct, i.e. a current instance, -- replace the reference to the type by a reference to the object. if Nkind (Arg) = N_Attribute_Reference and then Is_Access_Type (Etype (Arg)) and then Is_Entity_Name (Prefix (Arg)) and then Is_Type (Entity (Prefix (Arg))) then Arg := Make_Attribute_Reference (Loc, Prefix => New_Copy (Prefix (Id_Ref)), Attribute_Name => Name_Unrestricted_Access); elsif In_Init_Proc then -- Replace any possible references to the discriminant in the -- call to the record initialization procedure with references -- to the appropriate formal parameter. if Nkind (Arg) = N_Identifier and then Ekind (Entity (Arg)) = E_Discriminant then Arg := New_Occurrence_Of (Discriminal (Entity (Arg)), Loc); -- Otherwise make a copy of the default expression. Note that -- we use the current Sloc for this, because we do not want the -- call to appear to be at the declaration point. Within the -- expression, replace discriminants with their discriminals. else Arg := New_Copy_Tree (Arg, Map => Discr_Map, New_Sloc => Loc); end if; else if Is_Constrained (Full_Type) then Arg := Duplicate_Subexpr_No_Checks (Arg); else -- The constraints come from the discriminant default exps, -- they must be reevaluated, so we use New_Copy_Tree but we -- ensure the proper Sloc (for any embedded calls). -- In addition, if a predicate check is needed on the value -- of the discriminant, insert it ahead of the call. Arg := New_Copy_Tree (Arg, New_Sloc => Loc); end if; if Has_Predicates (Etype (Discr)) then Check_Predicated_Discriminant (Arg, Discr); end if; end if; -- Ada 2005 (AI-287): In case of default initialized components, -- if the component is constrained with a discriminant of the -- enclosing type, we need to generate the corresponding selected -- component node to access the discriminant value. In other cases -- this is not required, either because we are inside the init -- proc and we use the corresponding formal, or else because the -- component is constrained by an expression. if With_Default_Init and then Nkind (Id_Ref) = N_Selected_Component and then Nkind (Arg) = N_Identifier and then Ekind (Entity (Arg)) = E_Discriminant then Append_To (Args, Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Prefix (Id_Ref)), Selector_Name => Arg)); else Append_To (Args, Arg); end if; Next_Discriminant (Discr); end loop; end if; -- If this is a call to initialize the parent component of a derived -- tagged type, indicate that the tag should not be set in the parent. if Is_Tagged_Type (Full_Init_Type) and then not Is_CPP_Class (Full_Init_Type) and then Nkind (Id_Ref) = N_Selected_Component and then Chars (Selector_Name (Id_Ref)) = Name_uParent then Append_To (Args, New_Occurrence_Of (Standard_False, Loc)); elsif Present (Constructor_Ref) then Append_List_To (Args, New_Copy_List (Parameter_Associations (Constructor_Ref))); end if; Append_To (Res, Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (Proc, Loc), Parameter_Associations => Args)); if Needs_Finalization (Typ) and then Nkind (Id_Ref) = N_Selected_Component then if Chars (Selector_Name (Id_Ref)) /= Name_uParent then Init_Call := Make_Init_Call (Obj_Ref => New_Copy_Tree (First_Arg), Typ => Typ); -- Guard against a missing [Deep_]Initialize when the type was not -- properly frozen. if Present (Init_Call) then Append_To (Res, Init_Call); end if; end if; end if; return Res; exception when RE_Not_Available => return Empty_List; end Build_Initialization_Call; ---------------------------- -- Build_Record_Init_Proc -- ---------------------------- procedure Build_Record_Init_Proc (N : Node_Id; Rec_Ent : Entity_Id) is Decls : constant List_Id := New_List; Discr_Map : constant Elist_Id := New_Elmt_List; Loc : constant Source_Ptr := Sloc (Rec_Ent); Counter : Nat := 0; Proc_Id : Entity_Id; Rec_Type : Entity_Id; Set_Tag : Entity_Id := Empty; function Build_Assignment (Id : Entity_Id; N : Node_Id) return List_Id; -- Build an assignment statement which assigns the default expression -- to its corresponding record component if defined. The left hand side -- of the assignment is marked Assignment_OK so that initialization of -- limited private records works correctly. This routine may also build -- an adjustment call if the component is controlled. procedure Build_Discriminant_Assignments (Statement_List : List_Id); -- If the record has discriminants, add assignment statements to -- Statement_List to initialize the discriminant values from the -- arguments of the initialization procedure. function Build_Init_Statements (Comp_List : Node_Id) return List_Id; -- Build a list representing a sequence of statements which initialize -- components of the given component list. This may involve building -- case statements for the variant parts. Append any locally declared -- objects on list Decls. function Build_Init_Call_Thru (Parameters : List_Id) return List_Id; -- Given an untagged type-derivation that declares discriminants, e.g. -- -- type R (R1, R2 : Integer) is record ... end record; -- type D (D1 : Integer) is new R (1, D1); -- -- we make the _init_proc of D be -- -- procedure _init_proc (X : D; D1 : Integer) is -- begin -- _init_proc (R (X), 1, D1); -- end _init_proc; -- -- This function builds the call statement in this _init_proc. procedure Build_CPP_Init_Procedure; -- Build the tree corresponding to the procedure specification and body -- of the IC procedure that initializes the C++ part of the dispatch -- table of an Ada tagged type that is a derivation of a CPP type. -- Install it as the CPP_Init TSS. procedure Build_Init_Procedure; -- Build the tree corresponding to the procedure specification and body -- of the initialization procedure and install it as the _init TSS. procedure Build_Offset_To_Top_Functions; -- Ada 2005 (AI-251): Build the tree corresponding to the procedure spec -- and body of Offset_To_Top, a function used in conjuction with types -- having secondary dispatch tables. procedure Build_Record_Checks (S : Node_Id; Check_List : List_Id); -- Add range checks to components of discriminated records. S is a -- subtype indication of a record component. Check_List is a list -- to which the check actions are appended. function Component_Needs_Simple_Initialization (T : Entity_Id) return Boolean; -- Determine if a component needs simple initialization, given its type -- T. This routine is the same as Needs_Simple_Initialization except for -- components of type Tag and Interface_Tag. These two access types do -- not require initialization since they are explicitly initialized by -- other means. function Parent_Subtype_Renaming_Discrims return Boolean; -- Returns True for base types N that rename discriminants, else False function Requires_Init_Proc (Rec_Id : Entity_Id) return Boolean; -- Determine whether a record initialization procedure needs to be -- generated for the given record type. ---------------------- -- Build_Assignment -- ---------------------- function Build_Assignment (Id : Entity_Id; N : Node_Id) return List_Id is N_Loc : constant Source_Ptr := Sloc (N); Typ : constant Entity_Id := Underlying_Type (Etype (Id)); Adj_Call : Node_Id; Exp : Node_Id := N; Kind : Node_Kind := Nkind (N); Lhs : Node_Id; Res : List_Id; begin Lhs := Make_Selected_Component (N_Loc, Prefix => Make_Identifier (Loc, Name_uInit), Selector_Name => New_Occurrence_Of (Id, N_Loc)); Set_Assignment_OK (Lhs); -- Case of an access attribute applied to the current instance. -- Replace the reference to the type by a reference to the actual -- object. (Note that this handles the case of the top level of -- the expression being given by such an attribute, but does not -- cover uses nested within an initial value expression. Nested -- uses are unlikely to occur in practice, but are theoretically -- possible.) It is not clear how to handle them without fully -- traversing the expression. ??? if Kind = N_Attribute_Reference and then Nam_In (Attribute_Name (N), Name_Unchecked_Access, Name_Unrestricted_Access) and then Is_Entity_Name (Prefix (N)) and then Is_Type (Entity (Prefix (N))) and then Entity (Prefix (N)) = Rec_Type then Exp := Make_Attribute_Reference (N_Loc, Prefix => Make_Identifier (N_Loc, Name_uInit), Attribute_Name => Name_Unrestricted_Access); end if; -- Take a copy of Exp to ensure that later copies of this component -- declaration in derived types see the original tree, not a node -- rewritten during expansion of the init_proc. If the copy contains -- itypes, the scope of the new itypes is the init_proc being built. Exp := New_Copy_Tree (Exp, New_Scope => Proc_Id); Res := New_List ( Make_Assignment_Statement (Loc, Name => Lhs, Expression => Exp)); Set_No_Ctrl_Actions (First (Res)); -- Adjust the tag if tagged (because of possible view conversions). -- Suppress the tag adjustment when not Tagged_Type_Expansion because -- tags are represented implicitly in objects. if Is_Tagged_Type (Typ) and then Tagged_Type_Expansion then Append_To (Res, Make_Assignment_Statement (N_Loc, Name => Make_Selected_Component (N_Loc, Prefix => New_Copy_Tree (Lhs, New_Scope => Proc_Id), Selector_Name => New_Occurrence_Of (First_Tag_Component (Typ), N_Loc)), Expression => Unchecked_Convert_To (RTE (RE_Tag), New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Underlying_Type (Typ)))), N_Loc)))); end if; -- Adjust the component if controlled except if it is an aggregate -- that will be expanded inline. if Kind = N_Qualified_Expression then Kind := Nkind (Expression (N)); end if; if Needs_Finalization (Typ) and then not (Nkind_In (Kind, N_Aggregate, N_Extension_Aggregate)) and then not Is_Limited_View (Typ) then Adj_Call := Make_Adjust_Call (Obj_Ref => New_Copy_Tree (Lhs), Typ => Etype (Id)); -- Guard against a missing [Deep_]Adjust when the component type -- was not properly frozen. if Present (Adj_Call) then Append_To (Res, Adj_Call); end if; end if; -- If a component type has a predicate, add check to the component -- assignment. Discriminants are handled at the point of the call, -- which provides for a better error message. if Comes_From_Source (Exp) and then Has_Predicates (Typ) and then not Predicate_Checks_Suppressed (Empty) and then not Predicates_Ignored (Typ) then Append (Make_Predicate_Check (Typ, Exp), Res); end if; return Res; exception when RE_Not_Available => return Empty_List; end Build_Assignment; ------------------------------------ -- Build_Discriminant_Assignments -- ------------------------------------ procedure Build_Discriminant_Assignments (Statement_List : List_Id) is Is_Tagged : constant Boolean := Is_Tagged_Type (Rec_Type); D : Entity_Id; D_Loc : Source_Ptr; begin if Has_Discriminants (Rec_Type) and then not Is_Unchecked_Union (Rec_Type) then D := First_Discriminant (Rec_Type); while Present (D) loop -- Don't generate the assignment for discriminants in derived -- tagged types if the discriminant is a renaming of some -- ancestor discriminant. This initialization will be done -- when initializing the _parent field of the derived record. if Is_Tagged and then Present (Corresponding_Discriminant (D)) then null; else D_Loc := Sloc (D); Append_List_To (Statement_List, Build_Assignment (D, New_Occurrence_Of (Discriminal (D), D_Loc))); end if; Next_Discriminant (D); end loop; end if; end Build_Discriminant_Assignments; -------------------------- -- Build_Init_Call_Thru -- -------------------------- function Build_Init_Call_Thru (Parameters : List_Id) return List_Id is Parent_Proc : constant Entity_Id := Base_Init_Proc (Etype (Rec_Type)); Parent_Type : constant Entity_Id := Etype (First_Formal (Parent_Proc)); Uparent_Type : constant Entity_Id := Underlying_Type (Parent_Type); First_Discr_Param : Node_Id; Arg : Node_Id; Args : List_Id; First_Arg : Node_Id; Parent_Discr : Entity_Id; Res : List_Id; begin -- First argument (_Init) is the object to be initialized. -- ??? not sure where to get a reasonable Loc for First_Arg First_Arg := OK_Convert_To (Parent_Type, New_Occurrence_Of (Defining_Identifier (First (Parameters)), Loc)); Set_Etype (First_Arg, Parent_Type); Args := New_List (Convert_Concurrent (First_Arg, Rec_Type)); -- In the tasks case, -- add _Master as the value of the _Master parameter -- add _Chain as the value of the _Chain parameter. -- add _Task_Name as the value of the _Task_Name parameter. -- At the outer level, these will be variables holding the -- corresponding values obtained from GNARL or the expander. -- -- At inner levels, they will be the parameters passed down through -- the outer routines. First_Discr_Param := Next (First (Parameters)); if Has_Task (Rec_Type) then if Restriction_Active (No_Task_Hierarchy) then Append_To (Args, New_Occurrence_Of (RTE (RE_Library_Task_Level), Loc)); else Append_To (Args, Make_Identifier (Loc, Name_uMaster)); end if; -- Add _Chain (not done for sequential elaboration policy, see -- comment for Create_Restricted_Task_Sequential in s-tarest.ads). if Partition_Elaboration_Policy /= 'S' then Append_To (Args, Make_Identifier (Loc, Name_uChain)); end if; Append_To (Args, Make_Identifier (Loc, Name_uTask_Name)); First_Discr_Param := Next (Next (Next (First_Discr_Param))); end if; -- Append discriminant values if Has_Discriminants (Uparent_Type) then pragma Assert (not Is_Tagged_Type (Uparent_Type)); Parent_Discr := First_Discriminant (Uparent_Type); while Present (Parent_Discr) loop -- Get the initial value for this discriminant -- ??? needs to be cleaned up to use parent_Discr_Constr -- directly. declare Discr : Entity_Id := First_Stored_Discriminant (Uparent_Type); Discr_Value : Elmt_Id := First_Elmt (Stored_Constraint (Rec_Type)); begin while Original_Record_Component (Parent_Discr) /= Discr loop Next_Stored_Discriminant (Discr); Next_Elmt (Discr_Value); end loop; Arg := Node (Discr_Value); end; -- Append it to the list if Nkind (Arg) = N_Identifier and then Ekind (Entity (Arg)) = E_Discriminant then Append_To (Args, New_Occurrence_Of (Discriminal (Entity (Arg)), Loc)); -- Case of access discriminants. We replace the reference -- to the type by a reference to the actual object. -- Is above comment right??? Use of New_Copy below seems mighty -- suspicious ??? else Append_To (Args, New_Copy (Arg)); end if; Next_Discriminant (Parent_Discr); end loop; end if; Res := New_List ( Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (Parent_Proc, Loc), Parameter_Associations => Args)); return Res; end Build_Init_Call_Thru; ----------------------------------- -- Build_Offset_To_Top_Functions -- ----------------------------------- procedure Build_Offset_To_Top_Functions is procedure Build_Offset_To_Top_Function (Iface_Comp : Entity_Id); -- Generate: -- function Fxx (O : Address) return Storage_Offset is -- type Acc is access all <Typ>; -- begin -- return Acc!(O).Iface_Comp'Position; -- end Fxx; ---------------------------------- -- Build_Offset_To_Top_Function -- ---------------------------------- procedure Build_Offset_To_Top_Function (Iface_Comp : Entity_Id) is Body_Node : Node_Id; Func_Id : Entity_Id; Spec_Node : Node_Id; Acc_Type : Entity_Id; begin Func_Id := Make_Temporary (Loc, 'F'); Set_DT_Offset_To_Top_Func (Iface_Comp, Func_Id); -- Generate -- function Fxx (O : in Rec_Typ) return Storage_Offset; Spec_Node := New_Node (N_Function_Specification, Loc); Set_Defining_Unit_Name (Spec_Node, Func_Id); Set_Parameter_Specifications (Spec_Node, New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uO), In_Present => True, Parameter_Type => New_Occurrence_Of (RTE (RE_Address), Loc)))); Set_Result_Definition (Spec_Node, New_Occurrence_Of (RTE (RE_Storage_Offset), Loc)); -- Generate -- function Fxx (O : in Rec_Typ) return Storage_Offset is -- begin -- return O.Iface_Comp'Position; -- end Fxx; Body_Node := New_Node (N_Subprogram_Body, Loc); Set_Specification (Body_Node, Spec_Node); Acc_Type := Make_Temporary (Loc, 'T'); Set_Declarations (Body_Node, New_List ( Make_Full_Type_Declaration (Loc, Defining_Identifier => Acc_Type, Type_Definition => Make_Access_To_Object_Definition (Loc, All_Present => True, Null_Exclusion_Present => False, Constant_Present => False, Subtype_Indication => New_Occurrence_Of (Rec_Type, Loc))))); Set_Handled_Statement_Sequence (Body_Node, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => Unchecked_Convert_To (Acc_Type, Make_Identifier (Loc, Name_uO)), Selector_Name => New_Occurrence_Of (Iface_Comp, Loc)), Attribute_Name => Name_Position))))); Set_Ekind (Func_Id, E_Function); Set_Mechanism (Func_Id, Default_Mechanism); Set_Is_Internal (Func_Id, True); if not Debug_Generated_Code then Set_Debug_Info_Off (Func_Id); end if; Analyze (Body_Node); Append_Freeze_Action (Rec_Type, Body_Node); end Build_Offset_To_Top_Function; -- Local variables Iface_Comp : Node_Id; Iface_Comp_Elmt : Elmt_Id; Ifaces_Comp_List : Elist_Id; -- Start of processing for Build_Offset_To_Top_Functions begin -- Offset_To_Top_Functions are built only for derivations of types -- with discriminants that cover interface types. -- Nothing is needed either in case of virtual targets, since -- interfaces are handled directly by the target. if not Is_Tagged_Type (Rec_Type) or else Etype (Rec_Type) = Rec_Type or else not Has_Discriminants (Etype (Rec_Type)) or else not Tagged_Type_Expansion then return; end if; Collect_Interface_Components (Rec_Type, Ifaces_Comp_List); -- For each interface type with secondary dispatch table we generate -- the Offset_To_Top_Functions (required to displace the pointer in -- interface conversions) Iface_Comp_Elmt := First_Elmt (Ifaces_Comp_List); while Present (Iface_Comp_Elmt) loop Iface_Comp := Node (Iface_Comp_Elmt); pragma Assert (Is_Interface (Related_Type (Iface_Comp))); -- If the interface is a parent of Rec_Type it shares the primary -- dispatch table and hence there is no need to build the function if not Is_Ancestor (Related_Type (Iface_Comp), Rec_Type, Use_Full_View => True) then Build_Offset_To_Top_Function (Iface_Comp); end if; Next_Elmt (Iface_Comp_Elmt); end loop; end Build_Offset_To_Top_Functions; ------------------------------ -- Build_CPP_Init_Procedure -- ------------------------------ procedure Build_CPP_Init_Procedure is Body_Node : Node_Id; Body_Stmts : List_Id; Flag_Id : Entity_Id; Handled_Stmt_Node : Node_Id; Init_Tags_List : List_Id; Proc_Id : Entity_Id; Proc_Spec_Node : Node_Id; begin -- Check cases requiring no IC routine if not Is_CPP_Class (Root_Type (Rec_Type)) or else Is_CPP_Class (Rec_Type) or else CPP_Num_Prims (Rec_Type) = 0 or else not Tagged_Type_Expansion or else No_Run_Time_Mode then return; end if; -- Generate: -- Flag : Boolean := False; -- -- procedure Typ_IC is -- begin -- if not Flag then -- Copy C++ dispatch table slots from parent -- Update C++ slots of overridden primitives -- end if; -- end; Flag_Id := Make_Temporary (Loc, 'F'); Append_Freeze_Action (Rec_Type, Make_Object_Declaration (Loc, Defining_Identifier => Flag_Id, Object_Definition => New_Occurrence_Of (Standard_Boolean, Loc), Expression => New_Occurrence_Of (Standard_True, Loc))); Body_Stmts := New_List; Body_Node := New_Node (N_Subprogram_Body, Loc); Proc_Spec_Node := New_Node (N_Procedure_Specification, Loc); Proc_Id := Make_Defining_Identifier (Loc, Chars => Make_TSS_Name (Rec_Type, TSS_CPP_Init_Proc)); Set_Ekind (Proc_Id, E_Procedure); Set_Is_Internal (Proc_Id); Set_Defining_Unit_Name (Proc_Spec_Node, Proc_Id); Set_Parameter_Specifications (Proc_Spec_Node, New_List); Set_Specification (Body_Node, Proc_Spec_Node); Set_Declarations (Body_Node, New_List); Init_Tags_List := Build_Inherit_CPP_Prims (Rec_Type); Append_To (Init_Tags_List, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Flag_Id, Loc), Expression => New_Occurrence_Of (Standard_False, Loc))); Append_To (Body_Stmts, Make_If_Statement (Loc, Condition => New_Occurrence_Of (Flag_Id, Loc), Then_Statements => Init_Tags_List)); Handled_Stmt_Node := New_Node (N_Handled_Sequence_Of_Statements, Loc); Set_Statements (Handled_Stmt_Node, Body_Stmts); Set_Exception_Handlers (Handled_Stmt_Node, No_List); Set_Handled_Statement_Sequence (Body_Node, Handled_Stmt_Node); if not Debug_Generated_Code then Set_Debug_Info_Off (Proc_Id); end if; -- Associate CPP_Init_Proc with type Set_Init_Proc (Rec_Type, Proc_Id); end Build_CPP_Init_Procedure; -------------------------- -- Build_Init_Procedure -- -------------------------- procedure Build_Init_Procedure is Body_Stmts : List_Id; Body_Node : Node_Id; Handled_Stmt_Node : Node_Id; Init_Tags_List : List_Id; Parameters : List_Id; Proc_Spec_Node : Node_Id; Record_Extension_Node : Node_Id; begin Body_Stmts := New_List; Body_Node := New_Node (N_Subprogram_Body, Loc); Set_Ekind (Proc_Id, E_Procedure); Proc_Spec_Node := New_Node (N_Procedure_Specification, Loc); Set_Defining_Unit_Name (Proc_Spec_Node, Proc_Id); Parameters := Init_Formals (Rec_Type); Append_List_To (Parameters, Build_Discriminant_Formals (Rec_Type, True)); -- For tagged types, we add a flag to indicate whether the routine -- is called to initialize a parent component in the init_proc of -- a type extension. If the flag is false, we do not set the tag -- because it has been set already in the extension. if Is_Tagged_Type (Rec_Type) then Set_Tag := Make_Temporary (Loc, 'P'); Append_To (Parameters, Make_Parameter_Specification (Loc, Defining_Identifier => Set_Tag, Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc), Expression => New_Occurrence_Of (Standard_True, Loc))); end if; Set_Parameter_Specifications (Proc_Spec_Node, Parameters); Set_Specification (Body_Node, Proc_Spec_Node); Set_Declarations (Body_Node, Decls); -- N is a Derived_Type_Definition that renames the parameters of the -- ancestor type. We initialize it by expanding our discriminants and -- call the ancestor _init_proc with a type-converted object. if Parent_Subtype_Renaming_Discrims then Append_List_To (Body_Stmts, Build_Init_Call_Thru (Parameters)); elsif Nkind (Type_Definition (N)) = N_Record_Definition then Build_Discriminant_Assignments (Body_Stmts); if not Null_Present (Type_Definition (N)) then Append_List_To (Body_Stmts, Build_Init_Statements (Component_List (Type_Definition (N)))); end if; -- N is a Derived_Type_Definition with a possible non-empty -- extension. The initialization of a type extension consists in the -- initialization of the components in the extension. else Build_Discriminant_Assignments (Body_Stmts); Record_Extension_Node := Record_Extension_Part (Type_Definition (N)); if not Null_Present (Record_Extension_Node) then declare Stmts : constant List_Id := Build_Init_Statements ( Component_List (Record_Extension_Node)); begin -- The parent field must be initialized first because the -- offset of the new discriminants may depend on it. This is -- not needed if the parent is an interface type because in -- such case the initialization of the _parent field was not -- generated. if not Is_Interface (Etype (Rec_Ent)) then declare Parent_IP : constant Name_Id := Make_Init_Proc_Name (Etype (Rec_Ent)); Stmt : Node_Id; IP_Call : Node_Id; IP_Stmts : List_Id; begin -- Look for a call to the parent IP at the beginning -- of Stmts associated with the record extension Stmt := First (Stmts); IP_Call := Empty; while Present (Stmt) loop if Nkind (Stmt) = N_Procedure_Call_Statement and then Chars (Name (Stmt)) = Parent_IP then IP_Call := Stmt; exit; end if; Next (Stmt); end loop; -- If found then move it to the beginning of the -- statements of this IP routine if Present (IP_Call) then IP_Stmts := New_List; loop Stmt := Remove_Head (Stmts); Append_To (IP_Stmts, Stmt); exit when Stmt = IP_Call; end loop; Prepend_List_To (Body_Stmts, IP_Stmts); end if; end; end if; Append_List_To (Body_Stmts, Stmts); end; end if; end if; -- Add here the assignment to instantiate the Tag -- The assignment corresponds to the code: -- _Init._Tag := Typ'Tag; -- Suppress the tag assignment when not Tagged_Type_Expansion because -- tags are represented implicitly in objects. It is also suppressed -- in case of CPP_Class types because in this case the tag is -- initialized in the C++ side. if Is_Tagged_Type (Rec_Type) and then Tagged_Type_Expansion and then not No_Run_Time_Mode then -- Case 1: Ada tagged types with no CPP ancestor. Set the tags of -- the actual object and invoke the IP of the parent (in this -- order). The tag must be initialized before the call to the IP -- of the parent and the assignments to other components because -- the initial value of the components may depend on the tag (eg. -- through a dispatching operation on an access to the current -- type). The tag assignment is not done when initializing the -- parent component of a type extension, because in that case the -- tag is set in the extension. if not Is_CPP_Class (Root_Type (Rec_Type)) then -- Initialize the primary tag component Init_Tags_List := New_List ( Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Selector_Name => New_Occurrence_Of (First_Tag_Component (Rec_Type), Loc)), Expression => New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Rec_Type))), Loc))); -- Ada 2005 (AI-251): Initialize the secondary tags components -- located at fixed positions (tags whose position depends on -- variable size components are initialized later ---see below) if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) then Init_Secondary_Tags (Typ => Rec_Type, Target => Make_Identifier (Loc, Name_uInit), Stmts_List => Init_Tags_List, Fixed_Comps => True, Variable_Comps => False); end if; Prepend_To (Body_Stmts, Make_If_Statement (Loc, Condition => New_Occurrence_Of (Set_Tag, Loc), Then_Statements => Init_Tags_List)); -- Case 2: CPP type. The imported C++ constructor takes care of -- tags initialization. No action needed here because the IP -- is built by Set_CPP_Constructors; in this case the IP is a -- wrapper that invokes the C++ constructor and copies the C++ -- tags locally. Done to inherit the C++ slots in Ada derivations -- (see case 3). elsif Is_CPP_Class (Rec_Type) then pragma Assert (False); null; -- Case 3: Combined hierarchy containing C++ types and Ada tagged -- type derivations. Derivations of imported C++ classes add a -- complication, because we cannot inhibit tag setting in the -- constructor for the parent. Hence we initialize the tag after -- the call to the parent IP (that is, in reverse order compared -- with pure Ada hierarchies ---see comment on case 1). else -- Initialize the primary tag Init_Tags_List := New_List ( Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Selector_Name => New_Occurrence_Of (First_Tag_Component (Rec_Type), Loc)), Expression => New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Rec_Type))), Loc))); -- Ada 2005 (AI-251): Initialize the secondary tags components -- located at fixed positions (tags whose position depends on -- variable size components are initialized later ---see below) if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) then Init_Secondary_Tags (Typ => Rec_Type, Target => Make_Identifier (Loc, Name_uInit), Stmts_List => Init_Tags_List, Fixed_Comps => True, Variable_Comps => False); end if; -- Initialize the tag component after invocation of parent IP. -- Generate: -- parent_IP(_init.parent); // Invokes the C++ constructor -- [ typIC; ] // Inherit C++ slots from parent -- init_tags declare Ins_Nod : Node_Id; begin -- Search for the call to the IP of the parent. We assume -- that the first init_proc call is for the parent. Ins_Nod := First (Body_Stmts); while Present (Next (Ins_Nod)) and then (Nkind (Ins_Nod) /= N_Procedure_Call_Statement or else not Is_Init_Proc (Name (Ins_Nod))) loop Next (Ins_Nod); end loop; -- The IC routine copies the inherited slots of the C+ part -- of the dispatch table from the parent and updates the -- overridden C++ slots. if CPP_Num_Prims (Rec_Type) > 0 then declare Init_DT : Entity_Id; New_Nod : Node_Id; begin Init_DT := CPP_Init_Proc (Rec_Type); pragma Assert (Present (Init_DT)); New_Nod := Make_Procedure_Call_Statement (Loc, New_Occurrence_Of (Init_DT, Loc)); Insert_After (Ins_Nod, New_Nod); -- Update location of init tag statements Ins_Nod := New_Nod; end; end if; Insert_List_After (Ins_Nod, Init_Tags_List); end; end if; -- Ada 2005 (AI-251): Initialize the secondary tag components -- located at variable positions. We delay the generation of this -- code until here because the value of the attribute 'Position -- applied to variable size components of the parent type that -- depend on discriminants is only safely read at runtime after -- the parent components have been initialized. if Ada_Version >= Ada_2005 and then not Is_Interface (Rec_Type) and then Has_Interfaces (Rec_Type) and then Has_Discriminants (Etype (Rec_Type)) and then Is_Variable_Size_Record (Etype (Rec_Type)) then Init_Tags_List := New_List; Init_Secondary_Tags (Typ => Rec_Type, Target => Make_Identifier (Loc, Name_uInit), Stmts_List => Init_Tags_List, Fixed_Comps => False, Variable_Comps => True); if Is_Non_Empty_List (Init_Tags_List) then Append_List_To (Body_Stmts, Init_Tags_List); end if; end if; end if; Handled_Stmt_Node := New_Node (N_Handled_Sequence_Of_Statements, Loc); Set_Statements (Handled_Stmt_Node, Body_Stmts); -- Generate: -- Deep_Finalize (_init, C1, ..., CN); -- raise; if Counter > 0 and then Needs_Finalization (Rec_Type) and then not Is_Abstract_Type (Rec_Type) and then not Restriction_Active (No_Exception_Propagation) then declare DF_Call : Node_Id; DF_Id : Entity_Id; begin -- Create a local version of Deep_Finalize which has indication -- of partial initialization state. DF_Id := Make_Temporary (Loc, 'F'); Append_To (Decls, Make_Local_Deep_Finalize (Rec_Type, DF_Id)); DF_Call := Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (DF_Id, Loc), Parameter_Associations => New_List ( Make_Identifier (Loc, Name_uInit), New_Occurrence_Of (Standard_False, Loc))); -- Do not emit warnings related to the elaboration order when a -- controlled object is declared before the body of Finalize is -- seen. Set_No_Elaboration_Check (DF_Call); Set_Exception_Handlers (Handled_Stmt_Node, New_List ( Make_Exception_Handler (Loc, Exception_Choices => New_List ( Make_Others_Choice (Loc)), Statements => New_List ( DF_Call, Make_Raise_Statement (Loc))))); end; else Set_Exception_Handlers (Handled_Stmt_Node, No_List); end if; Set_Handled_Statement_Sequence (Body_Node, Handled_Stmt_Node); if not Debug_Generated_Code then Set_Debug_Info_Off (Proc_Id); end if; -- Associate Init_Proc with type, and determine if the procedure -- is null (happens because of the Initialize_Scalars pragma case, -- where we have to generate a null procedure in case it is called -- by a client with Initialize_Scalars set). Such procedures have -- to be generated, but do not have to be called, so we mark them -- as null to suppress the call. Set_Init_Proc (Rec_Type, Proc_Id); if List_Length (Body_Stmts) = 1 -- We must skip SCIL nodes because they may have been added to this -- list by Insert_Actions. and then Nkind (First_Non_SCIL_Node (Body_Stmts)) = N_Null_Statement then Set_Is_Null_Init_Proc (Proc_Id); end if; end Build_Init_Procedure; --------------------------- -- Build_Init_Statements -- --------------------------- function Build_Init_Statements (Comp_List : Node_Id) return List_Id is Checks : constant List_Id := New_List; Actions : List_Id := No_List; Counter_Id : Entity_Id := Empty; Comp_Loc : Source_Ptr; Decl : Node_Id; Has_POC : Boolean; Id : Entity_Id; Parent_Stmts : List_Id; Stmts : List_Id; Typ : Entity_Id; procedure Increment_Counter (Loc : Source_Ptr); -- Generate an "increment by one" statement for the current counter -- and append it to the list Stmts. procedure Make_Counter (Loc : Source_Ptr); -- Create a new counter for the current component list. The routine -- creates a new defining Id, adds an object declaration and sets -- the Id generator for the next variant. ----------------------- -- Increment_Counter -- ----------------------- procedure Increment_Counter (Loc : Source_Ptr) is begin -- Generate: -- Counter := Counter + 1; Append_To (Stmts, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Counter_Id, Loc), Expression => Make_Op_Add (Loc, Left_Opnd => New_Occurrence_Of (Counter_Id, Loc), Right_Opnd => Make_Integer_Literal (Loc, 1)))); end Increment_Counter; ------------------ -- Make_Counter -- ------------------ procedure Make_Counter (Loc : Source_Ptr) is begin -- Increment the Id generator Counter := Counter + 1; -- Create the entity and declaration Counter_Id := Make_Defining_Identifier (Loc, Chars => New_External_Name ('C', Counter)); -- Generate: -- Cnn : Integer := 0; Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => Counter_Id, Object_Definition => New_Occurrence_Of (Standard_Integer, Loc), Expression => Make_Integer_Literal (Loc, 0))); end Make_Counter; -- Start of processing for Build_Init_Statements begin if Null_Present (Comp_List) then return New_List (Make_Null_Statement (Loc)); end if; Parent_Stmts := New_List; Stmts := New_List; -- Loop through visible declarations of task types and protected -- types moving any expanded code from the spec to the body of the -- init procedure. if Is_Task_Record_Type (Rec_Type) or else Is_Protected_Record_Type (Rec_Type) then declare Decl : constant Node_Id := Parent (Corresponding_Concurrent_Type (Rec_Type)); Def : Node_Id; N1 : Node_Id; N2 : Node_Id; begin if Is_Task_Record_Type (Rec_Type) then Def := Task_Definition (Decl); else Def := Protected_Definition (Decl); end if; if Present (Def) then N1 := First (Visible_Declarations (Def)); while Present (N1) loop N2 := N1; N1 := Next (N1); if Nkind (N2) in N_Statement_Other_Than_Procedure_Call or else Nkind (N2) in N_Raise_xxx_Error or else Nkind (N2) = N_Procedure_Call_Statement then Append_To (Stmts, New_Copy_Tree (N2, New_Scope => Proc_Id)); Rewrite (N2, Make_Null_Statement (Sloc (N2))); Analyze (N2); end if; end loop; end if; end; end if; -- Loop through components, skipping pragmas, in 2 steps. The first -- step deals with regular components. The second step deals with -- components that have per object constraints and no explicit -- initialization. Has_POC := False; -- First pass : regular components Decl := First_Non_Pragma (Component_Items (Comp_List)); while Present (Decl) loop Comp_Loc := Sloc (Decl); Build_Record_Checks (Subtype_Indication (Component_Definition (Decl)), Checks); Id := Defining_Identifier (Decl); Typ := Etype (Id); -- Leave any processing of per-object constrained component for -- the second pass. if Has_Access_Constraint (Id) and then No (Expression (Decl)) then Has_POC := True; -- Regular component cases else -- In the context of the init proc, references to discriminants -- resolve to denote the discriminals: this is where we can -- freeze discriminant dependent component subtypes. if not Is_Frozen (Typ) then Append_List_To (Stmts, Freeze_Entity (Typ, N)); end if; -- Explicit initialization if Present (Expression (Decl)) then if Is_CPP_Constructor_Call (Expression (Decl)) then Actions := Build_Initialization_Call (Comp_Loc, Id_Ref => Make_Selected_Component (Comp_Loc, Prefix => Make_Identifier (Comp_Loc, Name_uInit), Selector_Name => New_Occurrence_Of (Id, Comp_Loc)), Typ => Typ, In_Init_Proc => True, Enclos_Type => Rec_Type, Discr_Map => Discr_Map, Constructor_Ref => Expression (Decl)); else Actions := Build_Assignment (Id, Expression (Decl)); end if; -- CPU, Dispatching_Domain, Priority, and Secondary_Stack_Size -- components are filled in with the corresponding rep-item -- expression of the concurrent type (if any). elsif Ekind (Scope (Id)) = E_Record_Type and then Present (Corresponding_Concurrent_Type (Scope (Id))) and then Nam_In (Chars (Id), Name_uCPU, Name_uDispatching_Domain, Name_uPriority, Name_uSecondary_Stack_Size) then declare Exp : Node_Id; Nam : Name_Id; Ritem : Node_Id; begin if Chars (Id) = Name_uCPU then Nam := Name_CPU; elsif Chars (Id) = Name_uDispatching_Domain then Nam := Name_Dispatching_Domain; elsif Chars (Id) = Name_uPriority then Nam := Name_Priority; elsif Chars (Id) = Name_uSecondary_Stack_Size then Nam := Name_Secondary_Stack_Size; end if; -- Get the Rep Item (aspect specification, attribute -- definition clause or pragma) of the corresponding -- concurrent type. Ritem := Get_Rep_Item (Corresponding_Concurrent_Type (Scope (Id)), Nam, Check_Parents => False); if Present (Ritem) then -- Pragma case if Nkind (Ritem) = N_Pragma then Exp := First (Pragma_Argument_Associations (Ritem)); if Nkind (Exp) = N_Pragma_Argument_Association then Exp := Expression (Exp); end if; -- Conversion for Priority expression if Nam = Name_Priority then if Pragma_Name (Ritem) = Name_Priority and then not GNAT_Mode then Exp := Convert_To (RTE (RE_Priority), Exp); else Exp := Convert_To (RTE (RE_Any_Priority), Exp); end if; end if; -- Aspect/Attribute definition clause case else Exp := Expression (Ritem); -- Conversion for Priority expression if Nam = Name_Priority then if Chars (Ritem) = Name_Priority and then not GNAT_Mode then Exp := Convert_To (RTE (RE_Priority), Exp); else Exp := Convert_To (RTE (RE_Any_Priority), Exp); end if; end if; end if; -- Conversion for Dispatching_Domain value if Nam = Name_Dispatching_Domain then Exp := Unchecked_Convert_To (RTE (RE_Dispatching_Domain_Access), Exp); end if; Actions := Build_Assignment (Id, Exp); -- Nothing needed if no Rep Item else Actions := No_List; end if; end; -- Composite component with its own Init_Proc elsif not Is_Interface (Typ) and then Has_Non_Null_Base_Init_Proc (Typ) then Actions := Build_Initialization_Call (Comp_Loc, Make_Selected_Component (Comp_Loc, Prefix => Make_Identifier (Comp_Loc, Name_uInit), Selector_Name => New_Occurrence_Of (Id, Comp_Loc)), Typ, In_Init_Proc => True, Enclos_Type => Rec_Type, Discr_Map => Discr_Map); Clean_Task_Names (Typ, Proc_Id); -- Simple initialization elsif Component_Needs_Simple_Initialization (Typ) then Actions := Build_Assignment (Id, Get_Simple_Init_Val (Typ, N, Esize (Id))); -- Nothing needed for this case else Actions := No_List; end if; if Present (Checks) then if Chars (Id) = Name_uParent then Append_List_To (Parent_Stmts, Checks); else Append_List_To (Stmts, Checks); end if; end if; if Present (Actions) then if Chars (Id) = Name_uParent then Append_List_To (Parent_Stmts, Actions); else Append_List_To (Stmts, Actions); -- Preserve initialization state in the current counter if Needs_Finalization (Typ) then if No (Counter_Id) then Make_Counter (Comp_Loc); end if; Increment_Counter (Comp_Loc); end if; end if; end if; end if; Next_Non_Pragma (Decl); end loop; -- The parent field must be initialized first because variable -- size components of the parent affect the location of all the -- new components. Prepend_List_To (Stmts, Parent_Stmts); -- Set up tasks and protected object support. This needs to be done -- before any component with a per-object access discriminant -- constraint, or any variant part (which may contain such -- components) is initialized, because the initialization of these -- components may reference the enclosing concurrent object. -- For a task record type, add the task create call and calls to bind -- any interrupt (signal) entries. if Is_Task_Record_Type (Rec_Type) then -- In the case of the restricted run time the ATCB has already -- been preallocated. if Restricted_Profile then Append_To (Stmts, Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Selector_Name => Make_Identifier (Loc, Name_uTask_Id)), Expression => Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_uInit), Selector_Name => Make_Identifier (Loc, Name_uATCB)), Attribute_Name => Name_Unchecked_Access))); end if; Append_To (Stmts, Make_Task_Create_Call (Rec_Type)); declare Task_Type : constant Entity_Id := Corresponding_Concurrent_Type (Rec_Type); Task_Decl : constant Node_Id := Parent (Task_Type); Task_Def : constant Node_Id := Task_Definition (Task_Decl); Decl_Loc : Source_Ptr; Ent : Entity_Id; Vis_Decl : Node_Id; begin if Present (Task_Def) then Vis_Decl := First (Visible_Declarations (Task_Def)); while Present (Vis_Decl) loop Decl_Loc := Sloc (Vis_Decl); if Nkind (Vis_Decl) = N_Attribute_Definition_Clause then if Get_Attribute_Id (Chars (Vis_Decl)) = Attribute_Address then Ent := Entity (Name (Vis_Decl)); if Ekind (Ent) = E_Entry then Append_To (Stmts, Make_Procedure_Call_Statement (Decl_Loc, Name => New_Occurrence_Of (RTE ( RE_Bind_Interrupt_To_Entry), Decl_Loc), Parameter_Associations => New_List ( Make_Selected_Component (Decl_Loc, Prefix => Make_Identifier (Decl_Loc, Name_uInit), Selector_Name => Make_Identifier (Decl_Loc, Name_uTask_Id)), Entry_Index_Expression (Decl_Loc, Ent, Empty, Task_Type), Expression (Vis_Decl)))); end if; end if; end if; Next (Vis_Decl); end loop; end if; end; end if; -- For a protected type, add statements generated by -- Make_Initialize_Protection. if Is_Protected_Record_Type (Rec_Type) then Append_List_To (Stmts, Make_Initialize_Protection (Rec_Type)); end if; -- Second pass: components with per-object constraints if Has_POC then Decl := First_Non_Pragma (Component_Items (Comp_List)); while Present (Decl) loop Comp_Loc := Sloc (Decl); Id := Defining_Identifier (Decl); Typ := Etype (Id); if Has_Access_Constraint (Id) and then No (Expression (Decl)) then if Has_Non_Null_Base_Init_Proc (Typ) then Append_List_To (Stmts, Build_Initialization_Call (Comp_Loc, Make_Selected_Component (Comp_Loc, Prefix => Make_Identifier (Comp_Loc, Name_uInit), Selector_Name => New_Occurrence_Of (Id, Comp_Loc)), Typ, In_Init_Proc => True, Enclos_Type => Rec_Type, Discr_Map => Discr_Map)); Clean_Task_Names (Typ, Proc_Id); -- Preserve initialization state in the current counter if Needs_Finalization (Typ) then if No (Counter_Id) then Make_Counter (Comp_Loc); end if; Increment_Counter (Comp_Loc); end if; elsif Component_Needs_Simple_Initialization (Typ) then Append_List_To (Stmts, Build_Assignment (Id, Get_Simple_Init_Val (Typ, N, Esize (Id)))); end if; end if; Next_Non_Pragma (Decl); end loop; end if; -- Process the variant part if Present (Variant_Part (Comp_List)) then declare Variant_Alts : constant List_Id := New_List; Var_Loc : Source_Ptr; Variant : Node_Id; begin Variant := First_Non_Pragma (Variants (Variant_Part (Comp_List))); while Present (Variant) loop Var_Loc := Sloc (Variant); Append_To (Variant_Alts, Make_Case_Statement_Alternative (Var_Loc, Discrete_Choices => New_Copy_List (Discrete_Choices (Variant)), Statements => Build_Init_Statements (Component_List (Variant)))); Next_Non_Pragma (Variant); end loop; -- The expression of the case statement which is a reference -- to one of the discriminants is replaced by the appropriate -- formal parameter of the initialization procedure. Append_To (Stmts, Make_Case_Statement (Var_Loc, Expression => New_Occurrence_Of (Discriminal ( Entity (Name (Variant_Part (Comp_List)))), Var_Loc), Alternatives => Variant_Alts)); end; end if; -- If no initializations when generated for component declarations -- corresponding to this Stmts, append a null statement to Stmts to -- to make it a valid Ada tree. if Is_Empty_List (Stmts) then Append (Make_Null_Statement (Loc), Stmts); end if; return Stmts; exception when RE_Not_Available => return Empty_List; end Build_Init_Statements; ------------------------- -- Build_Record_Checks -- ------------------------- procedure Build_Record_Checks (S : Node_Id; Check_List : List_Id) is Subtype_Mark_Id : Entity_Id; procedure Constrain_Array (SI : Node_Id; Check_List : List_Id); -- Apply a list of index constraints to an unconstrained array type. -- The first parameter is the entity for the resulting subtype. -- Check_List is a list to which the check actions are appended. --------------------- -- Constrain_Array -- --------------------- procedure Constrain_Array (SI : Node_Id; Check_List : List_Id) is C : constant Node_Id := Constraint (SI); Number_Of_Constraints : Nat := 0; Index : Node_Id; S, T : Entity_Id; procedure Constrain_Index (Index : Node_Id; S : Node_Id; Check_List : List_Id); -- Process an index constraint in a constrained array declaration. -- The constraint can be either a subtype name or a range with or -- without an explicit subtype mark. Index is the corresponding -- index of the unconstrained array. S is the range expression. -- Check_List is a list to which the check actions are appended. --------------------- -- Constrain_Index -- --------------------- procedure Constrain_Index (Index : Node_Id; S : Node_Id; Check_List : List_Id) is T : constant Entity_Id := Etype (Index); begin if Nkind (S) = N_Range then Process_Range_Expr_In_Decl (S, T, Check_List => Check_List); end if; end Constrain_Index; -- Start of processing for Constrain_Array begin T := Entity (Subtype_Mark (SI)); if Is_Access_Type (T) then T := Designated_Type (T); end if; S := First (Constraints (C)); while Present (S) loop Number_Of_Constraints := Number_Of_Constraints + 1; Next (S); end loop; -- In either case, the index constraint must provide a discrete -- range for each index of the array type and the type of each -- discrete range must be the same as that of the corresponding -- index. (RM 3.6.1) S := First (Constraints (C)); Index := First_Index (T); Analyze (Index); -- Apply constraints to each index type for J in 1 .. Number_Of_Constraints loop Constrain_Index (Index, S, Check_List); Next (Index); Next (S); end loop; end Constrain_Array; -- Start of processing for Build_Record_Checks begin if Nkind (S) = N_Subtype_Indication then Find_Type (Subtype_Mark (S)); Subtype_Mark_Id := Entity (Subtype_Mark (S)); -- Remaining processing depends on type case Ekind (Subtype_Mark_Id) is when Array_Kind => Constrain_Array (S, Check_List); when others => null; end case; end if; end Build_Record_Checks; ------------------------------------------- -- Component_Needs_Simple_Initialization -- ------------------------------------------- function Component_Needs_Simple_Initialization (T : Entity_Id) return Boolean is begin return Needs_Simple_Initialization (T) and then not Is_RTE (T, RE_Tag) -- Ada 2005 (AI-251): Check also the tag of abstract interfaces and then not Is_RTE (T, RE_Interface_Tag); end Component_Needs_Simple_Initialization; -------------------------------------- -- Parent_Subtype_Renaming_Discrims -- -------------------------------------- function Parent_Subtype_Renaming_Discrims return Boolean is De : Entity_Id; Dp : Entity_Id; begin if Base_Type (Rec_Ent) /= Rec_Ent then return False; end if; if Etype (Rec_Ent) = Rec_Ent or else not Has_Discriminants (Rec_Ent) or else Is_Constrained (Rec_Ent) or else Is_Tagged_Type (Rec_Ent) then return False; end if; -- If there are no explicit stored discriminants we have inherited -- the root type discriminants so far, so no renamings occurred. if First_Discriminant (Rec_Ent) = First_Stored_Discriminant (Rec_Ent) then return False; end if; -- Check if we have done some trivial renaming of the parent -- discriminants, i.e. something like -- -- type DT (X1, X2: int) is new PT (X1, X2); De := First_Discriminant (Rec_Ent); Dp := First_Discriminant (Etype (Rec_Ent)); while Present (De) loop pragma Assert (Present (Dp)); if Corresponding_Discriminant (De) /= Dp then return True; end if; Next_Discriminant (De); Next_Discriminant (Dp); end loop; return Present (Dp); end Parent_Subtype_Renaming_Discrims; ------------------------ -- Requires_Init_Proc -- ------------------------ function Requires_Init_Proc (Rec_Id : Entity_Id) return Boolean is Comp_Decl : Node_Id; Id : Entity_Id; Typ : Entity_Id; begin -- Definitely do not need one if specifically suppressed if Initialization_Suppressed (Rec_Id) then return False; end if; -- If it is a type derived from a type with unknown discriminants, -- we cannot build an initialization procedure for it. if Has_Unknown_Discriminants (Rec_Id) or else Has_Unknown_Discriminants (Etype (Rec_Id)) then return False; end if; -- Otherwise we need to generate an initialization procedure if -- Is_CPP_Class is False and at least one of the following applies: -- 1. Discriminants are present, since they need to be initialized -- with the appropriate discriminant constraint expressions. -- However, the discriminant of an unchecked union does not -- count, since the discriminant is not present. -- 2. The type is a tagged type, since the implicit Tag component -- needs to be initialized with a pointer to the dispatch table. -- 3. The type contains tasks -- 4. One or more components has an initial value -- 5. One or more components is for a type which itself requires -- an initialization procedure. -- 6. One or more components is a type that requires simple -- initialization (see Needs_Simple_Initialization), except -- that types Tag and Interface_Tag are excluded, since fields -- of these types are initialized by other means. -- 7. The type is the record type built for a task type (since at -- the very least, Create_Task must be called) -- 8. The type is the record type built for a protected type (since -- at least Initialize_Protection must be called) -- 9. The type is marked as a public entity. The reason we add this -- case (even if none of the above apply) is to properly handle -- Initialize_Scalars. If a package is compiled without an IS -- pragma, and the client is compiled with an IS pragma, then -- the client will think an initialization procedure is present -- and call it, when in fact no such procedure is required, but -- since the call is generated, there had better be a routine -- at the other end of the call, even if it does nothing). -- Note: the reason we exclude the CPP_Class case is because in this -- case the initialization is performed by the C++ constructors, and -- the IP is built by Set_CPP_Constructors. if Is_CPP_Class (Rec_Id) then return False; elsif Is_Interface (Rec_Id) then return False; elsif (Has_Discriminants (Rec_Id) and then not Is_Unchecked_Union (Rec_Id)) or else Is_Tagged_Type (Rec_Id) or else Is_Concurrent_Record_Type (Rec_Id) or else Has_Task (Rec_Id) then return True; end if; Id := First_Component (Rec_Id); while Present (Id) loop Comp_Decl := Parent (Id); Typ := Etype (Id); if Present (Expression (Comp_Decl)) or else Has_Non_Null_Base_Init_Proc (Typ) or else Component_Needs_Simple_Initialization (Typ) then return True; end if; Next_Component (Id); end loop; -- As explained above, a record initialization procedure is needed -- for public types in case Initialize_Scalars applies to a client. -- However, such a procedure is not needed in the case where either -- of restrictions No_Initialize_Scalars or No_Default_Initialization -- applies. No_Initialize_Scalars excludes the possibility of using -- Initialize_Scalars in any partition, and No_Default_Initialization -- implies that no initialization should ever be done for objects of -- the type, so is incompatible with Initialize_Scalars. if not Restriction_Active (No_Initialize_Scalars) and then not Restriction_Active (No_Default_Initialization) and then Is_Public (Rec_Id) then return True; end if; return False; end Requires_Init_Proc; -- Start of processing for Build_Record_Init_Proc begin Rec_Type := Defining_Identifier (N); -- This may be full declaration of a private type, in which case -- the visible entity is a record, and the private entity has been -- exchanged with it in the private part of the current package. -- The initialization procedure is built for the record type, which -- is retrievable from the private entity. if Is_Incomplete_Or_Private_Type (Rec_Type) then Rec_Type := Underlying_Type (Rec_Type); end if; -- If we have a variant record with restriction No_Implicit_Conditionals -- in effect, then we skip building the procedure. This is safe because -- if we can see the restriction, so can any caller, calls to initialize -- such records are not allowed for variant records if this restriction -- is active. if Has_Variant_Part (Rec_Type) and then Restriction_Active (No_Implicit_Conditionals) then return; end if; -- If there are discriminants, build the discriminant map to replace -- discriminants by their discriminals in complex bound expressions. -- These only arise for the corresponding records of synchronized types. if Is_Concurrent_Record_Type (Rec_Type) and then Has_Discriminants (Rec_Type) then declare Disc : Entity_Id; begin Disc := First_Discriminant (Rec_Type); while Present (Disc) loop Append_Elmt (Disc, Discr_Map); Append_Elmt (Discriminal (Disc), Discr_Map); Next_Discriminant (Disc); end loop; end; end if; -- Derived types that have no type extension can use the initialization -- procedure of their parent and do not need a procedure of their own. -- This is only correct if there are no representation clauses for the -- type or its parent, and if the parent has in fact been frozen so -- that its initialization procedure exists. if Is_Derived_Type (Rec_Type) and then not Is_Tagged_Type (Rec_Type) and then not Is_Unchecked_Union (Rec_Type) and then not Has_New_Non_Standard_Rep (Rec_Type) and then not Parent_Subtype_Renaming_Discrims and then Has_Non_Null_Base_Init_Proc (Etype (Rec_Type)) then Copy_TSS (Base_Init_Proc (Etype (Rec_Type)), Rec_Type); -- Otherwise if we need an initialization procedure, then build one, -- mark it as public and inlinable and as having a completion. elsif Requires_Init_Proc (Rec_Type) or else Is_Unchecked_Union (Rec_Type) then Proc_Id := Make_Defining_Identifier (Loc, Chars => Make_Init_Proc_Name (Rec_Type)); -- If No_Default_Initialization restriction is active, then we don't -- want to build an init_proc, but we need to mark that an init_proc -- would be needed if this restriction was not active (so that we can -- detect attempts to call it), so set a dummy init_proc in place. if Restriction_Active (No_Default_Initialization) then Set_Init_Proc (Rec_Type, Proc_Id); return; end if; Build_Offset_To_Top_Functions; Build_CPP_Init_Procedure; Build_Init_Procedure; Set_Is_Public (Proc_Id, Is_Public (Rec_Ent)); Set_Is_Internal (Proc_Id); Set_Has_Completion (Proc_Id); if not Debug_Generated_Code then Set_Debug_Info_Off (Proc_Id); end if; Set_Is_Inlined (Proc_Id, Inline_Init_Proc (Rec_Type)); -- Do not build an aggregate if Modify_Tree_For_C, this isn't -- needed and may generate early references to non frozen types -- since we expand aggregate much more systematically. if Modify_Tree_For_C then return; end if; declare Agg : constant Node_Id := Build_Equivalent_Record_Aggregate (Rec_Type); procedure Collect_Itypes (Comp : Node_Id); -- Generate references to itypes in the aggregate, because -- the first use of the aggregate may be in a nested scope. -------------------- -- Collect_Itypes -- -------------------- procedure Collect_Itypes (Comp : Node_Id) is Ref : Node_Id; Sub_Aggr : Node_Id; Typ : constant Entity_Id := Etype (Comp); begin if Is_Array_Type (Typ) and then Is_Itype (Typ) then Ref := Make_Itype_Reference (Loc); Set_Itype (Ref, Typ); Append_Freeze_Action (Rec_Type, Ref); Ref := Make_Itype_Reference (Loc); Set_Itype (Ref, Etype (First_Index (Typ))); Append_Freeze_Action (Rec_Type, Ref); -- Recurse on nested arrays Sub_Aggr := First (Expressions (Comp)); while Present (Sub_Aggr) loop Collect_Itypes (Sub_Aggr); Next (Sub_Aggr); end loop; end if; end Collect_Itypes; begin -- If there is a static initialization aggregate for the type, -- generate itype references for the types of its (sub)components, -- to prevent out-of-scope errors in the resulting tree. -- The aggregate may have been rewritten as a Raise node, in which -- case there are no relevant itypes. if Present (Agg) and then Nkind (Agg) = N_Aggregate then Set_Static_Initialization (Proc_Id, Agg); declare Comp : Node_Id; begin Comp := First (Component_Associations (Agg)); while Present (Comp) loop Collect_Itypes (Expression (Comp)); Next (Comp); end loop; end; end if; end; end if; end Build_Record_Init_Proc; ---------------------------- -- Build_Slice_Assignment -- ---------------------------- -- Generates the following subprogram: -- procedure Assign -- (Source, Target : Array_Type, -- Left_Lo, Left_Hi : Index; -- Right_Lo, Right_Hi : Index; -- Rev : Boolean) -- is -- Li1 : Index; -- Ri1 : Index; -- begin -- if Left_Hi < Left_Lo then -- return; -- end if; -- if Rev then -- Li1 := Left_Hi; -- Ri1 := Right_Hi; -- else -- Li1 := Left_Lo; -- Ri1 := Right_Lo; -- end if; -- loop -- Target (Li1) := Source (Ri1); -- if Rev then -- exit when Li1 = Left_Lo; -- Li1 := Index'pred (Li1); -- Ri1 := Index'pred (Ri1); -- else -- exit when Li1 = Left_Hi; -- Li1 := Index'succ (Li1); -- Ri1 := Index'succ (Ri1); -- end if; -- end loop; -- end Assign; procedure Build_Slice_Assignment (Typ : Entity_Id) is Loc : constant Source_Ptr := Sloc (Typ); Index : constant Entity_Id := Base_Type (Etype (First_Index (Typ))); Larray : constant Entity_Id := Make_Temporary (Loc, 'A'); Rarray : constant Entity_Id := Make_Temporary (Loc, 'R'); Left_Lo : constant Entity_Id := Make_Temporary (Loc, 'L'); Left_Hi : constant Entity_Id := Make_Temporary (Loc, 'L'); Right_Lo : constant Entity_Id := Make_Temporary (Loc, 'R'); Right_Hi : constant Entity_Id := Make_Temporary (Loc, 'R'); Rev : constant Entity_Id := Make_Temporary (Loc, 'D'); -- Formal parameters of procedure Proc_Name : constant Entity_Id := Make_Defining_Identifier (Loc, Chars => Make_TSS_Name (Typ, TSS_Slice_Assign)); Lnn : constant Entity_Id := Make_Temporary (Loc, 'L'); Rnn : constant Entity_Id := Make_Temporary (Loc, 'R'); -- Subscripts for left and right sides Decls : List_Id; Loops : Node_Id; Stats : List_Id; begin -- Build declarations for indexes Decls := New_List; Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => Lnn, Object_Definition => New_Occurrence_Of (Index, Loc))); Append_To (Decls, Make_Object_Declaration (Loc, Defining_Identifier => Rnn, Object_Definition => New_Occurrence_Of (Index, Loc))); Stats := New_List; -- Build test for empty slice case Append_To (Stats, Make_If_Statement (Loc, Condition => Make_Op_Lt (Loc, Left_Opnd => New_Occurrence_Of (Left_Hi, Loc), Right_Opnd => New_Occurrence_Of (Left_Lo, Loc)), Then_Statements => New_List (Make_Simple_Return_Statement (Loc)))); -- Build initializations for indexes declare F_Init : constant List_Id := New_List; B_Init : constant List_Id := New_List; begin Append_To (F_Init, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Lnn, Loc), Expression => New_Occurrence_Of (Left_Lo, Loc))); Append_To (F_Init, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Rnn, Loc), Expression => New_Occurrence_Of (Right_Lo, Loc))); Append_To (B_Init, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Lnn, Loc), Expression => New_Occurrence_Of (Left_Hi, Loc))); Append_To (B_Init, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Rnn, Loc), Expression => New_Occurrence_Of (Right_Hi, Loc))); Append_To (Stats, Make_If_Statement (Loc, Condition => New_Occurrence_Of (Rev, Loc), Then_Statements => B_Init, Else_Statements => F_Init)); end; -- Now construct the assignment statement Loops := Make_Loop_Statement (Loc, Statements => New_List ( Make_Assignment_Statement (Loc, Name => Make_Indexed_Component (Loc, Prefix => New_Occurrence_Of (Larray, Loc), Expressions => New_List (New_Occurrence_Of (Lnn, Loc))), Expression => Make_Indexed_Component (Loc, Prefix => New_Occurrence_Of (Rarray, Loc), Expressions => New_List (New_Occurrence_Of (Rnn, Loc))))), End_Label => Empty); -- Build the exit condition and increment/decrement statements declare F_Ass : constant List_Id := New_List; B_Ass : constant List_Id := New_List; begin Append_To (F_Ass, Make_Exit_Statement (Loc, Condition => Make_Op_Eq (Loc, Left_Opnd => New_Occurrence_Of (Lnn, Loc), Right_Opnd => New_Occurrence_Of (Left_Hi, Loc)))); Append_To (F_Ass, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Lnn, Loc), Expression => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Index, Loc), Attribute_Name => Name_Succ, Expressions => New_List ( New_Occurrence_Of (Lnn, Loc))))); Append_To (F_Ass, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Rnn, Loc), Expression => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Index, Loc), Attribute_Name => Name_Succ, Expressions => New_List ( New_Occurrence_Of (Rnn, Loc))))); Append_To (B_Ass, Make_Exit_Statement (Loc, Condition => Make_Op_Eq (Loc, Left_Opnd => New_Occurrence_Of (Lnn, Loc), Right_Opnd => New_Occurrence_Of (Left_Lo, Loc)))); Append_To (B_Ass, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Lnn, Loc), Expression => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Index, Loc), Attribute_Name => Name_Pred, Expressions => New_List ( New_Occurrence_Of (Lnn, Loc))))); Append_To (B_Ass, Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Rnn, Loc), Expression => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Index, Loc), Attribute_Name => Name_Pred, Expressions => New_List ( New_Occurrence_Of (Rnn, Loc))))); Append_To (Statements (Loops), Make_If_Statement (Loc, Condition => New_Occurrence_Of (Rev, Loc), Then_Statements => B_Ass, Else_Statements => F_Ass)); end; Append_To (Stats, Loops); declare Spec : Node_Id; Formals : List_Id := New_List; begin Formals := New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Larray, Out_Present => True, Parameter_Type => New_Occurrence_Of (Base_Type (Typ), Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Rarray, Parameter_Type => New_Occurrence_Of (Base_Type (Typ), Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Left_Lo, Parameter_Type => New_Occurrence_Of (Index, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Left_Hi, Parameter_Type => New_Occurrence_Of (Index, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Right_Lo, Parameter_Type => New_Occurrence_Of (Index, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Right_Hi, Parameter_Type => New_Occurrence_Of (Index, Loc))); Append_To (Formals, Make_Parameter_Specification (Loc, Defining_Identifier => Rev, Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc))); Spec := Make_Procedure_Specification (Loc, Defining_Unit_Name => Proc_Name, Parameter_Specifications => Formals); Discard_Node ( Make_Subprogram_Body (Loc, Specification => Spec, Declarations => Decls, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => Stats))); end; Set_TSS (Typ, Proc_Name); Set_Is_Pure (Proc_Name); end Build_Slice_Assignment; ----------------------------- -- Build_Untagged_Equality -- ----------------------------- procedure Build_Untagged_Equality (Typ : Entity_Id) is Build_Eq : Boolean; Comp : Entity_Id; Decl : Node_Id; Op : Entity_Id; Prim : Elmt_Id; Eq_Op : Entity_Id; function User_Defined_Eq (T : Entity_Id) return Entity_Id; -- Check whether the type T has a user-defined primitive equality. If so -- return it, else return Empty. If true for a component of Typ, we have -- to build the primitive equality for it. --------------------- -- User_Defined_Eq -- --------------------- function User_Defined_Eq (T : Entity_Id) return Entity_Id is Prim : Elmt_Id; Op : Entity_Id; begin Op := TSS (T, TSS_Composite_Equality); if Present (Op) then return Op; end if; Prim := First_Elmt (Collect_Primitive_Operations (T)); while Present (Prim) loop Op := Node (Prim); if Chars (Op) = Name_Op_Eq and then Etype (Op) = Standard_Boolean and then Etype (First_Formal (Op)) = T and then Etype (Next_Formal (First_Formal (Op))) = T then return Op; end if; Next_Elmt (Prim); end loop; return Empty; end User_Defined_Eq; -- Start of processing for Build_Untagged_Equality begin -- If a record component has a primitive equality operation, we must -- build the corresponding one for the current type. Build_Eq := False; Comp := First_Component (Typ); while Present (Comp) loop if Is_Record_Type (Etype (Comp)) and then Present (User_Defined_Eq (Etype (Comp))) then Build_Eq := True; end if; Next_Component (Comp); end loop; -- If there is a user-defined equality for the type, we do not create -- the implicit one. Prim := First_Elmt (Collect_Primitive_Operations (Typ)); Eq_Op := Empty; while Present (Prim) loop if Chars (Node (Prim)) = Name_Op_Eq and then Comes_From_Source (Node (Prim)) -- Don't we also need to check formal types and return type as in -- User_Defined_Eq above??? then Eq_Op := Node (Prim); Build_Eq := False; exit; end if; Next_Elmt (Prim); end loop; -- If the type is derived, inherit the operation, if present, from the -- parent type. It may have been declared after the type derivation. If -- the parent type itself is derived, it may have inherited an operation -- that has itself been overridden, so update its alias and related -- flags. Ditto for inequality. if No (Eq_Op) and then Is_Derived_Type (Typ) then Prim := First_Elmt (Collect_Primitive_Operations (Etype (Typ))); while Present (Prim) loop if Chars (Node (Prim)) = Name_Op_Eq then Copy_TSS (Node (Prim), Typ); Build_Eq := False; declare Op : constant Entity_Id := User_Defined_Eq (Typ); Eq_Op : constant Entity_Id := Node (Prim); NE_Op : constant Entity_Id := Next_Entity (Eq_Op); begin if Present (Op) then Set_Alias (Op, Eq_Op); Set_Is_Abstract_Subprogram (Op, Is_Abstract_Subprogram (Eq_Op)); if Chars (Next_Entity (Op)) = Name_Op_Ne then Set_Is_Abstract_Subprogram (Next_Entity (Op), Is_Abstract_Subprogram (NE_Op)); end if; end if; end; exit; end if; Next_Elmt (Prim); end loop; end if; -- If not inherited and not user-defined, build body as for a type with -- tagged components. if Build_Eq then Decl := Make_Eq_Body (Typ, Make_TSS_Name (Typ, TSS_Composite_Equality)); Op := Defining_Entity (Decl); Set_TSS (Typ, Op); Set_Is_Pure (Op); if Is_Library_Level_Entity (Typ) then Set_Is_Public (Op); end if; end if; end Build_Untagged_Equality; ----------------------------------- -- Build_Variant_Record_Equality -- ----------------------------------- -- Generates: -- function _Equality (X, Y : T) return Boolean is -- begin -- -- Compare discriminants -- if X.D1 /= Y.D1 or else X.D2 /= Y.D2 or else ... then -- return False; -- end if; -- -- Compare components -- if X.C1 /= Y.C1 or else X.C2 /= Y.C2 or else ... then -- return False; -- end if; -- -- Compare variant part -- case X.D1 is -- when V1 => -- if X.C2 /= Y.C2 or else X.C3 /= Y.C3 or else ... then -- return False; -- end if; -- ... -- when Vn => -- if X.Cn /= Y.Cn or else ... then -- return False; -- end if; -- end case; -- return True; -- end _Equality; procedure Build_Variant_Record_Equality (Typ : Entity_Id) is Loc : constant Source_Ptr := Sloc (Typ); F : constant Entity_Id := Make_Defining_Identifier (Loc, Chars => Make_TSS_Name (Typ, TSS_Composite_Equality)); X : constant Entity_Id := Make_Defining_Identifier (Loc, Name_X); Y : constant Entity_Id := Make_Defining_Identifier (Loc, Name_Y); Def : constant Node_Id := Parent (Typ); Comps : constant Node_Id := Component_List (Type_Definition (Def)); Stmts : constant List_Id := New_List; Pspecs : constant List_Id := New_List; begin -- If we have a variant record with restriction No_Implicit_Conditionals -- in effect, then we skip building the procedure. This is safe because -- if we can see the restriction, so can any caller, calls to equality -- test routines are not allowed for variant records if this restriction -- is active. if Restriction_Active (No_Implicit_Conditionals) then return; end if; -- Derived Unchecked_Union types no longer inherit the equality function -- of their parent. if Is_Derived_Type (Typ) and then not Is_Unchecked_Union (Typ) and then not Has_New_Non_Standard_Rep (Typ) then declare Parent_Eq : constant Entity_Id := TSS (Root_Type (Typ), TSS_Composite_Equality); begin if Present (Parent_Eq) then Copy_TSS (Parent_Eq, Typ); return; end if; end; end if; Discard_Node ( Make_Subprogram_Body (Loc, Specification => Make_Function_Specification (Loc, Defining_Unit_Name => F, Parameter_Specifications => Pspecs, Result_Definition => New_Occurrence_Of (Standard_Boolean, Loc)), Declarations => New_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => Stmts))); Append_To (Pspecs, Make_Parameter_Specification (Loc, Defining_Identifier => X, Parameter_Type => New_Occurrence_Of (Typ, Loc))); Append_To (Pspecs, Make_Parameter_Specification (Loc, Defining_Identifier => Y, Parameter_Type => New_Occurrence_Of (Typ, Loc))); -- Unchecked_Unions require additional machinery to support equality. -- Two extra parameters (A and B) are added to the equality function -- parameter list for each discriminant of the type, in order to -- capture the inferred values of the discriminants in equality calls. -- The names of the parameters match the names of the corresponding -- discriminant, with an added suffix. if Is_Unchecked_Union (Typ) then declare Discr : Entity_Id; Discr_Type : Entity_Id; A, B : Entity_Id; New_Discrs : Elist_Id; begin New_Discrs := New_Elmt_List; Discr := First_Discriminant (Typ); while Present (Discr) loop Discr_Type := Etype (Discr); A := Make_Defining_Identifier (Loc, Chars => New_External_Name (Chars (Discr), 'A')); B := Make_Defining_Identifier (Loc, Chars => New_External_Name (Chars (Discr), 'B')); -- Add new parameters to the parameter list Append_To (Pspecs, Make_Parameter_Specification (Loc, Defining_Identifier => A, Parameter_Type => New_Occurrence_Of (Discr_Type, Loc))); Append_To (Pspecs, Make_Parameter_Specification (Loc, Defining_Identifier => B, Parameter_Type => New_Occurrence_Of (Discr_Type, Loc))); Append_Elmt (A, New_Discrs); -- Generate the following code to compare each of the inferred -- discriminants: -- if a /= b then -- return False; -- end if; Append_To (Stmts, Make_If_Statement (Loc, Condition => Make_Op_Ne (Loc, Left_Opnd => New_Occurrence_Of (A, Loc), Right_Opnd => New_Occurrence_Of (B, Loc)), Then_Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_False, Loc))))); Next_Discriminant (Discr); end loop; -- Generate component-by-component comparison. Note that we must -- propagate the inferred discriminants formals to act as -- the case statement switch. Their value is added when an -- equality call on unchecked unions is expanded. Append_List_To (Stmts, Make_Eq_Case (Typ, Comps, New_Discrs)); end; -- Normal case (not unchecked union) else Append_To (Stmts, Make_Eq_If (Typ, Discriminant_Specifications (Def))); Append_List_To (Stmts, Make_Eq_Case (Typ, Comps)); end if; Append_To (Stmts, Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_True, Loc))); Set_TSS (Typ, F); Set_Is_Pure (F); if not Debug_Generated_Code then Set_Debug_Info_Off (F); end if; end Build_Variant_Record_Equality; ----------------------------- -- Check_Stream_Attributes -- ----------------------------- procedure Check_Stream_Attributes (Typ : Entity_Id) is Comp : Entity_Id; Par_Read : constant Boolean := Stream_Attribute_Available (Typ, TSS_Stream_Read) and then not Has_Specified_Stream_Read (Typ); Par_Write : constant Boolean := Stream_Attribute_Available (Typ, TSS_Stream_Write) and then not Has_Specified_Stream_Write (Typ); procedure Check_Attr (Nam : Name_Id; TSS_Nam : TSS_Name_Type); -- Check that Comp has a user-specified Nam stream attribute ---------------- -- Check_Attr -- ---------------- procedure Check_Attr (Nam : Name_Id; TSS_Nam : TSS_Name_Type) is begin if not Stream_Attribute_Available (Etype (Comp), TSS_Nam) then Error_Msg_Name_1 := Nam; Error_Msg_N ("|component& in limited extension must have% attribute", Comp); end if; end Check_Attr; -- Start of processing for Check_Stream_Attributes begin if Par_Read or else Par_Write then Comp := First_Component (Typ); while Present (Comp) loop if Comes_From_Source (Comp) and then Original_Record_Component (Comp) = Comp and then Is_Limited_Type (Etype (Comp)) then if Par_Read then Check_Attr (Name_Read, TSS_Stream_Read); end if; if Par_Write then Check_Attr (Name_Write, TSS_Stream_Write); end if; end if; Next_Component (Comp); end loop; end if; end Check_Stream_Attributes; ---------------------- -- Clean_Task_Names -- ---------------------- procedure Clean_Task_Names (Typ : Entity_Id; Proc_Id : Entity_Id) is begin if Has_Task (Typ) and then not Restriction_Active (No_Implicit_Heap_Allocations) and then not Global_Discard_Names and then Tagged_Type_Expansion then Set_Uses_Sec_Stack (Proc_Id); end if; end Clean_Task_Names; ------------------------------ -- Expand_Freeze_Array_Type -- ------------------------------ procedure Expand_Freeze_Array_Type (N : Node_Id) is Typ : constant Entity_Id := Entity (N); Base : constant Entity_Id := Base_Type (Typ); Comp_Typ : constant Entity_Id := Component_Type (Typ); begin if not Is_Bit_Packed_Array (Typ) then -- If the component contains tasks, so does the array type. This may -- not be indicated in the array type because the component may have -- been a private type at the point of definition. Same if component -- type is controlled or contains protected objects. Propagate_Concurrent_Flags (Base, Comp_Typ); Set_Has_Controlled_Component (Base, Has_Controlled_Component (Comp_Typ) or else Is_Controlled (Comp_Typ)); if No (Init_Proc (Base)) then -- If this is an anonymous array created for a declaration with -- an initial value, its init_proc will never be called. The -- initial value itself may have been expanded into assignments, -- in which case the object declaration is carries the -- No_Initialization flag. if Is_Itype (Base) and then Nkind (Associated_Node_For_Itype (Base)) = N_Object_Declaration and then (Present (Expression (Associated_Node_For_Itype (Base))) or else No_Initialization (Associated_Node_For_Itype (Base))) then null; -- We do not need an init proc for string or wide [wide] string, -- since the only time these need initialization in normalize or -- initialize scalars mode, and these types are treated specially -- and do not need initialization procedures. elsif Is_Standard_String_Type (Base) then null; -- Otherwise we have to build an init proc for the subtype else Build_Array_Init_Proc (Base, N); end if; end if; if Typ = Base and then Has_Controlled_Component (Base) then Build_Controlling_Procs (Base); if not Is_Limited_Type (Comp_Typ) and then Number_Dimensions (Typ) = 1 then Build_Slice_Assignment (Typ); end if; end if; -- For packed case, default initialization, except if the component type -- is itself a packed structure with an initialization procedure, or -- initialize/normalize scalars active, and we have a base type, or the -- type is public, because in that case a client might specify -- Normalize_Scalars and there better be a public Init_Proc for it. elsif (Present (Init_Proc (Component_Type (Base))) and then No (Base_Init_Proc (Base))) or else (Init_Or_Norm_Scalars and then Base = Typ) or else Is_Public (Typ) then Build_Array_Init_Proc (Base, N); end if; end Expand_Freeze_Array_Type; ----------------------------------- -- Expand_Freeze_Class_Wide_Type -- ----------------------------------- procedure Expand_Freeze_Class_Wide_Type (N : Node_Id) is function Is_C_Derivation (Typ : Entity_Id) return Boolean; -- Given a type, determine whether it is derived from a C or C++ root --------------------- -- Is_C_Derivation -- --------------------- function Is_C_Derivation (Typ : Entity_Id) return Boolean is T : Entity_Id; begin T := Typ; loop if Is_CPP_Class (T) or else Convention (T) = Convention_C or else Convention (T) = Convention_CPP then return True; end if; exit when T = Etype (T); T := Etype (T); end loop; return False; end Is_C_Derivation; -- Local variables Typ : constant Entity_Id := Entity (N); Root : constant Entity_Id := Root_Type (Typ); -- Start of processing for Expand_Freeze_Class_Wide_Type begin -- Certain run-time configurations and targets do not provide support -- for controlled types. if Restriction_Active (No_Finalization) then return; -- Do not create TSS routine Finalize_Address when dispatching calls are -- disabled since the core of the routine is a dispatching call. elsif Restriction_Active (No_Dispatching_Calls) then return; -- Do not create TSS routine Finalize_Address for concurrent class-wide -- types. Ignore C, C++, CIL and Java types since it is assumed that the -- non-Ada side will handle their destruction. elsif Is_Concurrent_Type (Root) or else Is_C_Derivation (Root) or else Convention (Typ) = Convention_CPP then return; -- Do not create TSS routine Finalize_Address when compiling in CodePeer -- mode since the routine contains an Unchecked_Conversion. elsif CodePeer_Mode then return; end if; -- Create the body of TSS primitive Finalize_Address. This automatically -- sets the TSS entry for the class-wide type. Make_Finalize_Address_Body (Typ); end Expand_Freeze_Class_Wide_Type; ------------------------------------ -- Expand_Freeze_Enumeration_Type -- ------------------------------------ procedure Expand_Freeze_Enumeration_Type (N : Node_Id) is Typ : constant Entity_Id := Entity (N); Loc : constant Source_Ptr := Sloc (Typ); Arr : Entity_Id; Ent : Entity_Id; Fent : Entity_Id; Is_Contiguous : Boolean; Ityp : Entity_Id; Last_Repval : Uint; Lst : List_Id; Num : Nat; Pos_Expr : Node_Id; Func : Entity_Id; pragma Warnings (Off, Func); begin -- Various optimizations possible if given representation is contiguous Is_Contiguous := True; Ent := First_Literal (Typ); Last_Repval := Enumeration_Rep (Ent); Next_Literal (Ent); while Present (Ent) loop if Enumeration_Rep (Ent) - Last_Repval /= 1 then Is_Contiguous := False; exit; else Last_Repval := Enumeration_Rep (Ent); end if; Next_Literal (Ent); end loop; if Is_Contiguous then Set_Has_Contiguous_Rep (Typ); Ent := First_Literal (Typ); Num := 1; Lst := New_List (New_Occurrence_Of (Ent, Sloc (Ent))); else -- Build list of literal references Lst := New_List; Num := 0; Ent := First_Literal (Typ); while Present (Ent) loop Append_To (Lst, New_Occurrence_Of (Ent, Sloc (Ent))); Num := Num + 1; Next_Literal (Ent); end loop; end if; -- Now build an array declaration -- typA : array (Natural range 0 .. num - 1) of ctype := -- (v, v, v, v, v, ....) -- where ctype is the corresponding integer type. If the representation -- is contiguous, we only keep the first literal, which provides the -- offset for Pos_To_Rep computations. Arr := Make_Defining_Identifier (Loc, Chars => New_External_Name (Chars (Typ), 'A')); Append_Freeze_Action (Typ, Make_Object_Declaration (Loc, Defining_Identifier => Arr, Constant_Present => True, Object_Definition => Make_Constrained_Array_Definition (Loc, Discrete_Subtype_Definitions => New_List ( Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (Standard_Natural, Loc), Constraint => Make_Range_Constraint (Loc, Range_Expression => Make_Range (Loc, Low_Bound => Make_Integer_Literal (Loc, 0), High_Bound => Make_Integer_Literal (Loc, Num - 1))))), Component_Definition => Make_Component_Definition (Loc, Aliased_Present => False, Subtype_Indication => New_Occurrence_Of (Typ, Loc))), Expression => Make_Aggregate (Loc, Expressions => Lst))); Set_Enum_Pos_To_Rep (Typ, Arr); -- Now we build the function that converts representation values to -- position values. This function has the form: -- function _Rep_To_Pos (A : etype; F : Boolean) return Integer is -- begin -- case ityp!(A) is -- when enum-lit'Enum_Rep => return posval; -- when enum-lit'Enum_Rep => return posval; -- ... -- when others => -- [raise Constraint_Error when F "invalid data"] -- return -1; -- end case; -- end; -- Note: the F parameter determines whether the others case (no valid -- representation) raises Constraint_Error or returns a unique value -- of minus one. The latter case is used, e.g. in 'Valid code. -- Note: the reason we use Enum_Rep values in the case here is to avoid -- the code generator making inappropriate assumptions about the range -- of the values in the case where the value is invalid. ityp is a -- signed or unsigned integer type of appropriate width. -- Note: if exceptions are not supported, then we suppress the raise -- and return -1 unconditionally (this is an erroneous program in any -- case and there is no obligation to raise Constraint_Error here). We -- also do this if pragma Restrictions (No_Exceptions) is active. -- Is this right??? What about No_Exception_Propagation??? -- Representations are signed if Enumeration_Rep (First_Literal (Typ)) < 0 then -- The underlying type is signed. Reset the Is_Unsigned_Type -- explicitly, because it might have been inherited from -- parent type. Set_Is_Unsigned_Type (Typ, False); if Esize (Typ) <= Standard_Integer_Size then Ityp := Standard_Integer; else Ityp := Universal_Integer; end if; -- Representations are unsigned else if Esize (Typ) <= Standard_Integer_Size then Ityp := RTE (RE_Unsigned); else Ityp := RTE (RE_Long_Long_Unsigned); end if; end if; -- The body of the function is a case statement. First collect case -- alternatives, or optimize the contiguous case. Lst := New_List; -- If representation is contiguous, Pos is computed by subtracting -- the representation of the first literal. if Is_Contiguous then Ent := First_Literal (Typ); if Enumeration_Rep (Ent) = Last_Repval then -- Another special case: for a single literal, Pos is zero Pos_Expr := Make_Integer_Literal (Loc, Uint_0); else Pos_Expr := Convert_To (Standard_Integer, Make_Op_Subtract (Loc, Left_Opnd => Unchecked_Convert_To (Ityp, Make_Identifier (Loc, Name_uA)), Right_Opnd => Make_Integer_Literal (Loc, Intval => Enumeration_Rep (First_Literal (Typ))))); end if; Append_To (Lst, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_List ( Make_Range (Sloc (Enumeration_Rep_Expr (Ent)), Low_Bound => Make_Integer_Literal (Loc, Intval => Enumeration_Rep (Ent)), High_Bound => Make_Integer_Literal (Loc, Intval => Last_Repval))), Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => Pos_Expr)))); else Ent := First_Literal (Typ); while Present (Ent) loop Append_To (Lst, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_List ( Make_Integer_Literal (Sloc (Enumeration_Rep_Expr (Ent)), Intval => Enumeration_Rep (Ent))), Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => Make_Integer_Literal (Loc, Intval => Enumeration_Pos (Ent)))))); Next_Literal (Ent); end loop; end if; -- In normal mode, add the others clause with the test. -- If Predicates_Ignored is True, validity checks do not apply to -- the subtype. if not No_Exception_Handlers_Set and then not Predicates_Ignored (Typ) then Append_To (Lst, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_List (Make_Others_Choice (Loc)), Statements => New_List ( Make_Raise_Constraint_Error (Loc, Condition => Make_Identifier (Loc, Name_uF), Reason => CE_Invalid_Data), Make_Simple_Return_Statement (Loc, Expression => Make_Integer_Literal (Loc, -1))))); -- If either of the restrictions No_Exceptions_Handlers/Propagation is -- active then return -1 (we cannot usefully raise Constraint_Error in -- this case). See description above for further details. else Append_To (Lst, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_List (Make_Others_Choice (Loc)), Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => Make_Integer_Literal (Loc, -1))))); end if; -- Now we can build the function body Fent := Make_Defining_Identifier (Loc, Make_TSS_Name (Typ, TSS_Rep_To_Pos)); Func := Make_Subprogram_Body (Loc, Specification => Make_Function_Specification (Loc, Defining_Unit_Name => Fent, Parameter_Specifications => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uA), Parameter_Type => New_Occurrence_Of (Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uF), Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc))), Result_Definition => New_Occurrence_Of (Standard_Integer, Loc)), Declarations => Empty_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List ( Make_Case_Statement (Loc, Expression => Unchecked_Convert_To (Ityp, Make_Identifier (Loc, Name_uA)), Alternatives => Lst)))); Set_TSS (Typ, Fent); -- Set Pure flag (it will be reset if the current context is not Pure). -- We also pretend there was a pragma Pure_Function so that for purposes -- of optimization and constant-folding, we will consider the function -- Pure even if we are not in a Pure context). Set_Is_Pure (Fent); Set_Has_Pragma_Pure_Function (Fent); -- Unless we are in -gnatD mode, where we are debugging generated code, -- this is an internal entity for which we don't need debug info. if not Debug_Generated_Code then Set_Debug_Info_Off (Fent); end if; Set_Is_Inlined (Fent); exception when RE_Not_Available => return; end Expand_Freeze_Enumeration_Type; ------------------------------- -- Expand_Freeze_Record_Type -- ------------------------------- procedure Expand_Freeze_Record_Type (N : Node_Id) is Typ : constant Node_Id := Entity (N); Typ_Decl : constant Node_Id := Parent (Typ); Comp : Entity_Id; Comp_Typ : Entity_Id; Predef_List : List_Id; Wrapper_Decl_List : List_Id := No_List; Wrapper_Body_List : List_Id := No_List; Renamed_Eq : Node_Id := Empty; -- Defining unit name for the predefined equality function in the case -- where the type has a primitive operation that is a renaming of -- predefined equality (but only if there is also an overriding -- user-defined equality function). Used to pass this entity from -- Make_Predefined_Primitive_Specs to Predefined_Primitive_Bodies. -- Start of processing for Expand_Freeze_Record_Type begin -- Build discriminant checking functions if not a derived type (for -- derived types that are not tagged types, always use the discriminant -- checking functions of the parent type). However, for untagged types -- the derivation may have taken place before the parent was frozen, so -- we copy explicitly the discriminant checking functions from the -- parent into the components of the derived type. if not Is_Derived_Type (Typ) or else Has_New_Non_Standard_Rep (Typ) or else Is_Tagged_Type (Typ) then Build_Discr_Checking_Funcs (Typ_Decl); elsif Is_Derived_Type (Typ) and then not Is_Tagged_Type (Typ) -- If we have a derived Unchecked_Union, we do not inherit the -- discriminant checking functions from the parent type since the -- discriminants are non existent. and then not Is_Unchecked_Union (Typ) and then Has_Discriminants (Typ) then declare Old_Comp : Entity_Id; begin Old_Comp := First_Component (Base_Type (Underlying_Type (Etype (Typ)))); Comp := First_Component (Typ); while Present (Comp) loop if Ekind (Comp) = E_Component and then Chars (Comp) = Chars (Old_Comp) then Set_Discriminant_Checking_Func (Comp, Discriminant_Checking_Func (Old_Comp)); end if; Next_Component (Old_Comp); Next_Component (Comp); end loop; end; end if; if Is_Derived_Type (Typ) and then Is_Limited_Type (Typ) and then Is_Tagged_Type (Typ) then Check_Stream_Attributes (Typ); end if; -- Update task, protected, and controlled component flags, because some -- of the component types may have been private at the point of the -- record declaration. Detect anonymous access-to-controlled components. Comp := First_Component (Typ); while Present (Comp) loop Comp_Typ := Etype (Comp); Propagate_Concurrent_Flags (Typ, Comp_Typ); -- Do not set Has_Controlled_Component on a class-wide equivalent -- type. See Make_CW_Equivalent_Type. if not Is_Class_Wide_Equivalent_Type (Typ) and then (Has_Controlled_Component (Comp_Typ) or else (Chars (Comp) /= Name_uParent and then (Is_Controlled_Active (Comp_Typ)))) then Set_Has_Controlled_Component (Typ); end if; Next_Component (Comp); end loop; -- Handle constructors of untagged CPP_Class types if not Is_Tagged_Type (Typ) and then Is_CPP_Class (Typ) then Set_CPP_Constructors (Typ); end if; -- Creation of the Dispatch Table. Note that a Dispatch Table is built -- for regular tagged types as well as for Ada types deriving from a C++ -- Class, but not for tagged types directly corresponding to C++ classes -- In the later case we assume that it is created in the C++ side and we -- just use it. if Is_Tagged_Type (Typ) then -- Add the _Tag component if Underlying_Type (Etype (Typ)) = Typ then Expand_Tagged_Root (Typ); end if; if Is_CPP_Class (Typ) then Set_All_DT_Position (Typ); -- Create the tag entities with a minimum decoration if Tagged_Type_Expansion then Append_Freeze_Actions (Typ, Make_Tags (Typ)); end if; Set_CPP_Constructors (Typ); else if not Building_Static_DT (Typ) then -- Usually inherited primitives are not delayed but the first -- Ada extension of a CPP_Class is an exception since the -- address of the inherited subprogram has to be inserted in -- the new Ada Dispatch Table and this is a freezing action. -- Similarly, if this is an inherited operation whose parent is -- not frozen yet, it is not in the DT of the parent, and we -- generate an explicit freeze node for the inherited operation -- so it is properly inserted in the DT of the current type. declare Elmt : Elmt_Id; Subp : Entity_Id; begin Elmt := First_Elmt (Primitive_Operations (Typ)); while Present (Elmt) loop Subp := Node (Elmt); if Present (Alias (Subp)) then if Is_CPP_Class (Etype (Typ)) then Set_Has_Delayed_Freeze (Subp); elsif Has_Delayed_Freeze (Alias (Subp)) and then not Is_Frozen (Alias (Subp)) then Set_Is_Frozen (Subp, False); Set_Has_Delayed_Freeze (Subp); end if; end if; Next_Elmt (Elmt); end loop; end; end if; -- Unfreeze momentarily the type to add the predefined primitives -- operations. The reason we unfreeze is so that these predefined -- operations will indeed end up as primitive operations (which -- must be before the freeze point). Set_Is_Frozen (Typ, False); -- Do not add the spec of predefined primitives in case of -- CPP tagged type derivations that have convention CPP. if Is_CPP_Class (Root_Type (Typ)) and then Convention (Typ) = Convention_CPP then null; -- Do not add the spec of the predefined primitives if we are -- compiling under restriction No_Dispatching_Calls. elsif not Restriction_Active (No_Dispatching_Calls) then Make_Predefined_Primitive_Specs (Typ, Predef_List, Renamed_Eq); Insert_List_Before_And_Analyze (N, Predef_List); end if; -- Ada 2005 (AI-391): For a nonabstract null extension, create -- wrapper functions for each nonoverridden inherited function -- with a controlling result of the type. The wrapper for such -- a function returns an extension aggregate that invokes the -- parent function. if Ada_Version >= Ada_2005 and then not Is_Abstract_Type (Typ) and then Is_Null_Extension (Typ) then Make_Controlling_Function_Wrappers (Typ, Wrapper_Decl_List, Wrapper_Body_List); Insert_List_Before_And_Analyze (N, Wrapper_Decl_List); end if; -- Ada 2005 (AI-251): For a nonabstract type extension, build -- null procedure declarations for each set of homographic null -- procedures that are inherited from interface types but not -- overridden. This is done to ensure that the dispatch table -- entry associated with such null primitives are properly filled. if Ada_Version >= Ada_2005 and then Etype (Typ) /= Typ and then not Is_Abstract_Type (Typ) and then Has_Interfaces (Typ) then Insert_Actions (N, Make_Null_Procedure_Specs (Typ)); end if; Set_Is_Frozen (Typ); if not Is_Derived_Type (Typ) or else Is_Tagged_Type (Etype (Typ)) then Set_All_DT_Position (Typ); -- If this is a type derived from an untagged private type whose -- full view is tagged, the type is marked tagged for layout -- reasons, but it has no dispatch table. elsif Is_Derived_Type (Typ) and then Is_Private_Type (Etype (Typ)) and then not Is_Tagged_Type (Etype (Typ)) then return; end if; -- Create and decorate the tags. Suppress their creation when -- not Tagged_Type_Expansion because the dispatching mechanism is -- handled internally by the virtual target. if Tagged_Type_Expansion then Append_Freeze_Actions (Typ, Make_Tags (Typ)); -- Generate dispatch table of locally defined tagged type. -- Dispatch tables of library level tagged types are built -- later (see Analyze_Declarations). if not Building_Static_DT (Typ) then Append_Freeze_Actions (Typ, Make_DT (Typ)); end if; end if; -- If the type has unknown discriminants, propagate dispatching -- information to its underlying record view, which does not get -- its own dispatch table. if Is_Derived_Type (Typ) and then Has_Unknown_Discriminants (Typ) and then Present (Underlying_Record_View (Typ)) then declare Rep : constant Entity_Id := Underlying_Record_View (Typ); begin Set_Access_Disp_Table (Rep, Access_Disp_Table (Typ)); Set_Dispatch_Table_Wrappers (Rep, Dispatch_Table_Wrappers (Typ)); Set_Direct_Primitive_Operations (Rep, Direct_Primitive_Operations (Typ)); end; end if; -- Make sure that the primitives Initialize, Adjust and Finalize -- are Frozen before other TSS subprograms. We don't want them -- Frozen inside. if Is_Controlled (Typ) then if not Is_Limited_Type (Typ) then Append_Freeze_Actions (Typ, Freeze_Entity (Find_Prim_Op (Typ, Name_Adjust), Typ)); end if; Append_Freeze_Actions (Typ, Freeze_Entity (Find_Prim_Op (Typ, Name_Initialize), Typ)); Append_Freeze_Actions (Typ, Freeze_Entity (Find_Prim_Op (Typ, Name_Finalize), Typ)); end if; -- Freeze rest of primitive operations. There is no need to handle -- the predefined primitives if we are compiling under restriction -- No_Dispatching_Calls. if not Restriction_Active (No_Dispatching_Calls) then Append_Freeze_Actions (Typ, Predefined_Primitive_Freeze (Typ)); end if; end if; -- In the untagged case, ever since Ada 83 an equality function must -- be provided for variant records that are not unchecked unions. -- In Ada 2012 the equality function composes, and thus must be built -- explicitly just as for tagged records. elsif Has_Discriminants (Typ) and then not Is_Limited_Type (Typ) then declare Comps : constant Node_Id := Component_List (Type_Definition (Typ_Decl)); begin if Present (Comps) and then Present (Variant_Part (Comps)) then Build_Variant_Record_Equality (Typ); end if; end; -- Otherwise create primitive equality operation (AI05-0123) -- This is done unconditionally to ensure that tools can be linked -- properly with user programs compiled with older language versions. -- In addition, this is needed because "=" composes for bounded strings -- in all language versions (see Exp_Ch4.Expand_Composite_Equality). elsif Comes_From_Source (Typ) and then Convention (Typ) = Convention_Ada and then not Is_Limited_Type (Typ) then Build_Untagged_Equality (Typ); end if; -- Before building the record initialization procedure, if we are -- dealing with a concurrent record value type, then we must go through -- the discriminants, exchanging discriminals between the concurrent -- type and the concurrent record value type. See the section "Handling -- of Discriminants" in the Einfo spec for details. if Is_Concurrent_Record_Type (Typ) and then Has_Discriminants (Typ) then declare Ctyp : constant Entity_Id := Corresponding_Concurrent_Type (Typ); Conc_Discr : Entity_Id; Rec_Discr : Entity_Id; Temp : Entity_Id; begin Conc_Discr := First_Discriminant (Ctyp); Rec_Discr := First_Discriminant (Typ); while Present (Conc_Discr) loop Temp := Discriminal (Conc_Discr); Set_Discriminal (Conc_Discr, Discriminal (Rec_Discr)); Set_Discriminal (Rec_Discr, Temp); Set_Discriminal_Link (Discriminal (Conc_Discr), Conc_Discr); Set_Discriminal_Link (Discriminal (Rec_Discr), Rec_Discr); Next_Discriminant (Conc_Discr); Next_Discriminant (Rec_Discr); end loop; end; end if; if Has_Controlled_Component (Typ) then Build_Controlling_Procs (Typ); end if; Adjust_Discriminants (Typ); -- Do not need init for interfaces on virtual targets since they're -- abstract. if Tagged_Type_Expansion or else not Is_Interface (Typ) then Build_Record_Init_Proc (Typ_Decl, Typ); end if; -- For tagged type that are not interfaces, build bodies of primitive -- operations. Note: do this after building the record initialization -- procedure, since the primitive operations may need the initialization -- routine. There is no need to add predefined primitives of interfaces -- because all their predefined primitives are abstract. if Is_Tagged_Type (Typ) and then not Is_Interface (Typ) then -- Do not add the body of predefined primitives in case of CPP tagged -- type derivations that have convention CPP. if Is_CPP_Class (Root_Type (Typ)) and then Convention (Typ) = Convention_CPP then null; -- Do not add the body of the predefined primitives if we are -- compiling under restriction No_Dispatching_Calls or if we are -- compiling a CPP tagged type. elsif not Restriction_Active (No_Dispatching_Calls) then -- Create the body of TSS primitive Finalize_Address. This must -- be done before the bodies of all predefined primitives are -- created. If Typ is limited, Stream_Input and Stream_Read may -- produce build-in-place allocations and for those the expander -- needs Finalize_Address. Make_Finalize_Address_Body (Typ); Predef_List := Predefined_Primitive_Bodies (Typ, Renamed_Eq); Append_Freeze_Actions (Typ, Predef_List); end if; -- Ada 2005 (AI-391): If any wrappers were created for nonoverridden -- inherited functions, then add their bodies to the freeze actions. if Present (Wrapper_Body_List) then Append_Freeze_Actions (Typ, Wrapper_Body_List); end if; -- Create extra formals for the primitive operations of the type. -- This must be done before analyzing the body of the initialization -- procedure, because a self-referential type might call one of these -- primitives in the body of the init_proc itself. declare Elmt : Elmt_Id; Subp : Entity_Id; begin Elmt := First_Elmt (Primitive_Operations (Typ)); while Present (Elmt) loop Subp := Node (Elmt); if not Has_Foreign_Convention (Subp) and then not Is_Predefined_Dispatching_Operation (Subp) then Create_Extra_Formals (Subp); end if; Next_Elmt (Elmt); end loop; end; end if; end Expand_Freeze_Record_Type; ------------------------------------ -- Expand_N_Full_Type_Declaration -- ------------------------------------ procedure Expand_N_Full_Type_Declaration (N : Node_Id) is procedure Build_Master (Ptr_Typ : Entity_Id); -- Create the master associated with Ptr_Typ ------------------ -- Build_Master -- ------------------ procedure Build_Master (Ptr_Typ : Entity_Id) is Desig_Typ : Entity_Id := Designated_Type (Ptr_Typ); begin -- If the designated type is an incomplete view coming from a -- limited-with'ed package, we need to use the nonlimited view in -- case it has tasks. if Ekind (Desig_Typ) in Incomplete_Kind and then Present (Non_Limited_View (Desig_Typ)) then Desig_Typ := Non_Limited_View (Desig_Typ); end if; -- Anonymous access types are created for the components of the -- record parameter for an entry declaration. No master is created -- for such a type. if Comes_From_Source (N) and then Has_Task (Desig_Typ) then Build_Master_Entity (Ptr_Typ); Build_Master_Renaming (Ptr_Typ); -- Create a class-wide master because a Master_Id must be generated -- for access-to-limited-class-wide types whose root may be extended -- with task components. -- Note: This code covers access-to-limited-interfaces because they -- can be used to reference tasks implementing them. elsif Is_Limited_Class_Wide_Type (Desig_Typ) and then Tasking_Allowed then Build_Class_Wide_Master (Ptr_Typ); end if; end Build_Master; -- Local declarations Def_Id : constant Entity_Id := Defining_Identifier (N); B_Id : constant Entity_Id := Base_Type (Def_Id); FN : Node_Id; Par_Id : Entity_Id; -- Start of processing for Expand_N_Full_Type_Declaration begin if Is_Access_Type (Def_Id) then Build_Master (Def_Id); if Ekind (Def_Id) = E_Access_Protected_Subprogram_Type then Expand_Access_Protected_Subprogram_Type (N); end if; -- Array of anonymous access-to-task pointers elsif Ada_Version >= Ada_2005 and then Is_Array_Type (Def_Id) and then Is_Access_Type (Component_Type (Def_Id)) and then Ekind (Component_Type (Def_Id)) = E_Anonymous_Access_Type then Build_Master (Component_Type (Def_Id)); elsif Has_Task (Def_Id) then Expand_Previous_Access_Type (Def_Id); -- Check the components of a record type or array of records for -- anonymous access-to-task pointers. elsif Ada_Version >= Ada_2005 and then (Is_Record_Type (Def_Id) or else (Is_Array_Type (Def_Id) and then Is_Record_Type (Component_Type (Def_Id)))) then declare Comp : Entity_Id; First : Boolean; M_Id : Entity_Id; Typ : Entity_Id; begin if Is_Array_Type (Def_Id) then Comp := First_Entity (Component_Type (Def_Id)); else Comp := First_Entity (Def_Id); end if; -- Examine all components looking for anonymous access-to-task -- types. First := True; while Present (Comp) loop Typ := Etype (Comp); if Ekind (Typ) = E_Anonymous_Access_Type and then Has_Task (Available_View (Designated_Type (Typ))) and then No (Master_Id (Typ)) then -- Ensure that the record or array type have a _master if First then Build_Master_Entity (Def_Id); Build_Master_Renaming (Typ); M_Id := Master_Id (Typ); First := False; -- Reuse the same master to service any additional types else Set_Master_Id (Typ, M_Id); end if; end if; Next_Entity (Comp); end loop; end; end if; Par_Id := Etype (B_Id); -- The parent type is private then we need to inherit any TSS operations -- from the full view. if Ekind (Par_Id) in Private_Kind and then Present (Full_View (Par_Id)) then Par_Id := Base_Type (Full_View (Par_Id)); end if; if Nkind (Type_Definition (Original_Node (N))) = N_Derived_Type_Definition and then not Is_Tagged_Type (Def_Id) and then Present (Freeze_Node (Par_Id)) and then Present (TSS_Elist (Freeze_Node (Par_Id))) then Ensure_Freeze_Node (B_Id); FN := Freeze_Node (B_Id); if No (TSS_Elist (FN)) then Set_TSS_Elist (FN, New_Elmt_List); end if; declare T_E : constant Elist_Id := TSS_Elist (FN); Elmt : Elmt_Id; begin Elmt := First_Elmt (TSS_Elist (Freeze_Node (Par_Id))); while Present (Elmt) loop if Chars (Node (Elmt)) /= Name_uInit then Append_Elmt (Node (Elmt), T_E); end if; Next_Elmt (Elmt); end loop; -- If the derived type itself is private with a full view, then -- associate the full view with the inherited TSS_Elist as well. if Ekind (B_Id) in Private_Kind and then Present (Full_View (B_Id)) then Ensure_Freeze_Node (Base_Type (Full_View (B_Id))); Set_TSS_Elist (Freeze_Node (Base_Type (Full_View (B_Id))), TSS_Elist (FN)); end if; end; end if; end Expand_N_Full_Type_Declaration; --------------------------------- -- Expand_N_Object_Declaration -- --------------------------------- procedure Expand_N_Object_Declaration (N : Node_Id) is Loc : constant Source_Ptr := Sloc (N); Def_Id : constant Entity_Id := Defining_Identifier (N); Expr : constant Node_Id := Expression (N); Obj_Def : constant Node_Id := Object_Definition (N); Typ : constant Entity_Id := Etype (Def_Id); Base_Typ : constant Entity_Id := Base_Type (Typ); Expr_Q : Node_Id; function Build_Equivalent_Aggregate return Boolean; -- If the object has a constrained discriminated type and no initial -- value, it may be possible to build an equivalent aggregate instead, -- and prevent an actual call to the initialization procedure. procedure Check_Large_Modular_Array; -- Check that the size of the array can be computed without overflow, -- and generate a Storage_Error otherwise. This is only relevant for -- array types whose index in a (mod 2**64) type, where wrap-around -- arithmetic might yield a meaningless value for the length of the -- array, or its corresponding attribute. procedure Default_Initialize_Object (After : Node_Id); -- Generate all default initialization actions for object Def_Id. Any -- new code is inserted after node After. function Rewrite_As_Renaming return Boolean; -- Indicate whether to rewrite a declaration with initialization into an -- object renaming declaration (see below). -------------------------------- -- Build_Equivalent_Aggregate -- -------------------------------- function Build_Equivalent_Aggregate return Boolean is Aggr : Node_Id; Comp : Entity_Id; Discr : Elmt_Id; Full_Type : Entity_Id; begin Full_Type := Typ; if Is_Private_Type (Typ) and then Present (Full_View (Typ)) then Full_Type := Full_View (Typ); end if; -- Only perform this transformation if Elaboration_Code is forbidden -- or undesirable, and if this is a global entity of a constrained -- record type. -- If Initialize_Scalars might be active this transformation cannot -- be performed either, because it will lead to different semantics -- or because elaboration code will in fact be created. if Ekind (Full_Type) /= E_Record_Subtype or else not Has_Discriminants (Full_Type) or else not Is_Constrained (Full_Type) or else Is_Controlled (Full_Type) or else Is_Limited_Type (Full_Type) or else not Restriction_Active (No_Initialize_Scalars) then return False; end if; if Ekind (Current_Scope) = E_Package and then (Restriction_Active (No_Elaboration_Code) or else Is_Preelaborated (Current_Scope)) then -- Building a static aggregate is possible if the discriminants -- have static values and the other components have static -- defaults or none. Discr := First_Elmt (Discriminant_Constraint (Full_Type)); while Present (Discr) loop if not Is_OK_Static_Expression (Node (Discr)) then return False; end if; Next_Elmt (Discr); end loop; -- Check that initialized components are OK, and that non- -- initialized components do not require a call to their own -- initialization procedure. Comp := First_Component (Full_Type); while Present (Comp) loop if Ekind (Comp) = E_Component and then Present (Expression (Parent (Comp))) and then not Is_OK_Static_Expression (Expression (Parent (Comp))) then return False; elsif Has_Non_Null_Base_Init_Proc (Etype (Comp)) then return False; end if; Next_Component (Comp); end loop; -- Everything is static, assemble the aggregate, discriminant -- values first. Aggr := Make_Aggregate (Loc, Expressions => New_List, Component_Associations => New_List); Discr := First_Elmt (Discriminant_Constraint (Full_Type)); while Present (Discr) loop Append_To (Expressions (Aggr), New_Copy (Node (Discr))); Next_Elmt (Discr); end loop; -- Now collect values of initialized components Comp := First_Component (Full_Type); while Present (Comp) loop if Ekind (Comp) = E_Component and then Present (Expression (Parent (Comp))) then Append_To (Component_Associations (Aggr), Make_Component_Association (Loc, Choices => New_List (New_Occurrence_Of (Comp, Loc)), Expression => New_Copy_Tree (Expression (Parent (Comp))))); end if; Next_Component (Comp); end loop; -- Finally, box-initialize remaining components Append_To (Component_Associations (Aggr), Make_Component_Association (Loc, Choices => New_List (Make_Others_Choice (Loc)), Expression => Empty)); Set_Box_Present (Last (Component_Associations (Aggr))); Set_Expression (N, Aggr); if Typ /= Full_Type then Analyze_And_Resolve (Aggr, Full_View (Base_Type (Full_Type))); Rewrite (Aggr, Unchecked_Convert_To (Typ, Aggr)); Analyze_And_Resolve (Aggr, Typ); else Analyze_And_Resolve (Aggr, Full_Type); end if; return True; else return False; end if; end Build_Equivalent_Aggregate; ------------------------------- -- Check_Large_Modular_Array -- ------------------------------- procedure Check_Large_Modular_Array is Index_Typ : Entity_Id; begin if Is_Array_Type (Typ) and then Is_Modular_Integer_Type (Etype (First_Index (Typ))) then -- To prevent arithmetic overflow with large values, we raise -- Storage_Error under the following guard: -- (Arr'Last / 2 - Arr'First / 2) > (2 ** 30) -- This takes care of the boundary case, but it is preferable to -- use a smaller limit, because even on 64-bit architectures an -- array of more than 2 ** 30 bytes is likely to raise -- Storage_Error. Index_Typ := Etype (First_Index (Typ)); if RM_Size (Index_Typ) = RM_Size (Standard_Long_Long_Integer) then Insert_Action (N, Make_Raise_Storage_Error (Loc, Condition => Make_Op_Ge (Loc, Left_Opnd => Make_Op_Subtract (Loc, Left_Opnd => Make_Op_Divide (Loc, Left_Opnd => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Typ, Loc), Attribute_Name => Name_Last), Right_Opnd => Make_Integer_Literal (Loc, Uint_2)), Right_Opnd => Make_Op_Divide (Loc, Left_Opnd => Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Typ, Loc), Attribute_Name => Name_First), Right_Opnd => Make_Integer_Literal (Loc, Uint_2))), Right_Opnd => Make_Integer_Literal (Loc, (Uint_2 ** 30))), Reason => SE_Object_Too_Large)); end if; end if; end Check_Large_Modular_Array; ------------------------------- -- Default_Initialize_Object -- ------------------------------- procedure Default_Initialize_Object (After : Node_Id) is function New_Object_Reference return Node_Id; -- Return a new reference to Def_Id with attributes Assignment_OK and -- Must_Not_Freeze already set. -------------------------- -- New_Object_Reference -- -------------------------- function New_Object_Reference return Node_Id is Obj_Ref : constant Node_Id := New_Occurrence_Of (Def_Id, Loc); begin -- The call to the type init proc or [Deep_]Finalize must not -- freeze the related object as the call is internally generated. -- This way legal rep clauses that apply to the object will not be -- flagged. Note that the initialization call may be removed if -- pragma Import is encountered or moved to the freeze actions of -- the object because of an address clause. Set_Assignment_OK (Obj_Ref); Set_Must_Not_Freeze (Obj_Ref); return Obj_Ref; end New_Object_Reference; -- Local variables Exceptions_OK : constant Boolean := not Restriction_Active (No_Exception_Propagation); Aggr_Init : Node_Id; Comp_Init : List_Id := No_List; Fin_Call : Node_Id; Init_Stmts : List_Id := No_List; Obj_Init : Node_Id := Empty; Obj_Ref : Node_Id; -- Start of processing for Default_Initialize_Object begin -- Default initialization is suppressed for objects that are already -- known to be imported (i.e. whose declaration specifies the Import -- aspect). Note that for objects with a pragma Import, we generate -- initialization here, and then remove it downstream when processing -- the pragma. It is also suppressed for variables for which a pragma -- Suppress_Initialization has been explicitly given if Is_Imported (Def_Id) or else Suppress_Initialization (Def_Id) then return; -- Nothing to do if the object being initialized is of a task type -- and restriction No_Tasking is in effect, because this is a direct -- violation of the restriction. elsif Is_Task_Type (Base_Typ) and then Restriction_Active (No_Tasking) then return; end if; -- The expansion performed by this routine is as follows: -- begin -- Abort_Defer; -- Type_Init_Proc (Obj); -- begin -- [Deep_]Initialize (Obj); -- exception -- when others => -- [Deep_]Finalize (Obj, Self => False); -- raise; -- end; -- at end -- Abort_Undefer_Direct; -- end; -- Initialize the components of the object if Has_Non_Null_Base_Init_Proc (Typ) and then not No_Initialization (N) and then not Initialization_Suppressed (Typ) then -- Do not initialize the components if No_Default_Initialization -- applies as the actual restriction check will occur later -- when the object is frozen as it is not known yet whether the -- object is imported or not. if not Restriction_Active (No_Default_Initialization) then -- If the values of the components are compile-time known, use -- their prebuilt aggregate form directly. Aggr_Init := Static_Initialization (Base_Init_Proc (Typ)); if Present (Aggr_Init) then Set_Expression (N, New_Copy_Tree (Aggr_Init, New_Scope => Current_Scope)); -- If type has discriminants, try to build an equivalent -- aggregate using discriminant values from the declaration. -- This is a useful optimization, in particular if restriction -- No_Elaboration_Code is active. elsif Build_Equivalent_Aggregate then null; -- Otherwise invoke the type init proc, generate: -- Type_Init_Proc (Obj); else Obj_Ref := New_Object_Reference; if Comes_From_Source (Def_Id) then Initialization_Warning (Obj_Ref); end if; Comp_Init := Build_Initialization_Call (Loc, Obj_Ref, Typ); end if; end if; -- Provide a default value if the object needs simple initialization -- and does not already have an initial value. A generated temporary -- does not require initialization because it will be assigned later. elsif Needs_Simple_Initialization (Typ, Initialize_Scalars and then No (Following_Address_Clause (N))) and then not Is_Internal (Def_Id) and then not Has_Init_Expression (N) then Set_No_Initialization (N, False); Set_Expression (N, Get_Simple_Init_Val (Typ, N, Esize (Def_Id))); Analyze_And_Resolve (Expression (N), Typ); end if; -- Initialize the object, generate: -- [Deep_]Initialize (Obj); if Needs_Finalization (Typ) and then not No_Initialization (N) then Obj_Init := Make_Init_Call (Obj_Ref => New_Occurrence_Of (Def_Id, Loc), Typ => Typ); end if; -- Build a special finalization block when both the object and its -- controlled components are to be initialized. The block finalizes -- the components if the object initialization fails. Generate: -- begin -- <Obj_Init> -- exception -- when others => -- <Fin_Call> -- raise; -- end; if Has_Controlled_Component (Typ) and then Present (Comp_Init) and then Present (Obj_Init) and then Exceptions_OK then Init_Stmts := Comp_Init; Fin_Call := Make_Final_Call (Obj_Ref => New_Object_Reference, Typ => Typ, Skip_Self => True); if Present (Fin_Call) then -- Do not emit warnings related to the elaboration order when a -- controlled object is declared before the body of Finalize is -- seen. Set_No_Elaboration_Check (Fin_Call); Append_To (Init_Stmts, Make_Block_Statement (Loc, Declarations => No_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Obj_Init), Exception_Handlers => New_List ( Make_Exception_Handler (Loc, Exception_Choices => New_List ( Make_Others_Choice (Loc)), Statements => New_List ( Fin_Call, Make_Raise_Statement (Loc))))))); end if; -- Otherwise finalization is not required, the initialization calls -- are passed to the abort block building circuitry, generate: -- Type_Init_Proc (Obj); -- [Deep_]Initialize (Obj); else if Present (Comp_Init) then Init_Stmts := Comp_Init; end if; if Present (Obj_Init) then if No (Init_Stmts) then Init_Stmts := New_List; end if; Append_To (Init_Stmts, Obj_Init); end if; end if; -- Build an abort block to protect the initialization calls if Abort_Allowed and then Present (Comp_Init) and then Present (Obj_Init) then -- Generate: -- Abort_Defer; Prepend_To (Init_Stmts, Build_Runtime_Call (Loc, RE_Abort_Defer)); -- When exceptions are propagated, abort deferral must take place -- in the presence of initialization or finalization exceptions. -- Generate: -- begin -- Abort_Defer; -- <Init_Stmts> -- at end -- Abort_Undefer_Direct; -- end; if Exceptions_OK then Init_Stmts := New_List ( Build_Abort_Undefer_Block (Loc, Stmts => Init_Stmts, Context => N)); -- Otherwise exceptions are not propagated. Generate: -- Abort_Defer; -- <Init_Stmts> -- Abort_Undefer; else Append_To (Init_Stmts, Build_Runtime_Call (Loc, RE_Abort_Undefer)); end if; end if; -- Insert the whole initialization sequence into the tree. If the -- object has a delayed freeze, as will be the case when it has -- aspect specifications, the initialization sequence is part of -- the freeze actions. if Present (Init_Stmts) then if Has_Delayed_Freeze (Def_Id) then Append_Freeze_Actions (Def_Id, Init_Stmts); else Insert_Actions_After (After, Init_Stmts); end if; end if; end Default_Initialize_Object; ------------------------- -- Rewrite_As_Renaming -- ------------------------- function Rewrite_As_Renaming return Boolean is begin -- If the object declaration appears in the form -- Obj : Ctrl_Typ := Func (...); -- where Ctrl_Typ is controlled but not immutably limited type, then -- the expansion of the function call should use a dereference of the -- result to reference the value on the secondary stack. -- Obj : Ctrl_Typ renames Func (...).all; -- As a result, the call avoids an extra copy. This an optimization, -- but it is required for passing ACATS tests in some cases where it -- would otherwise make two copies. The RM allows removing redunant -- Adjust/Finalize calls, but does not allow insertion of extra ones. -- This part is disabled for now, because it breaks GPS builds return (False -- ??? and then Nkind (Expr_Q) = N_Explicit_Dereference and then not Comes_From_Source (Expr_Q) and then Nkind (Original_Node (Expr_Q)) = N_Function_Call and then Nkind (Object_Definition (N)) in N_Has_Entity and then (Needs_Finalization (Entity (Object_Definition (N))))) -- If the initializing expression is for a variable with attribute -- OK_To_Rename set, then transform: -- Obj : Typ := Expr; -- into -- Obj : Typ renames Expr; -- provided that Obj is not aliased. The aliased case has to be -- excluded in general because Expr will not be aliased in -- general. or else (not Aliased_Present (N) and then Is_Entity_Name (Expr_Q) and then Ekind (Entity (Expr_Q)) = E_Variable and then OK_To_Rename (Entity (Expr_Q)) and then Is_Entity_Name (Obj_Def)); end Rewrite_As_Renaming; -- Local variables Next_N : constant Node_Id := Next (N); Adj_Call : Node_Id; Id_Ref : Node_Id; Tag_Assign : Node_Id; Init_After : Node_Id := N; -- Node after which the initialization actions are to be inserted. This -- is normally N, except for the case of a shared passive variable, in -- which case the init proc call must be inserted only after the bodies -- of the shared variable procedures have been seen. -- Start of processing for Expand_N_Object_Declaration begin -- Don't do anything for deferred constants. All proper actions will be -- expanded during the full declaration. if No (Expr) and Constant_Present (N) then return; end if; -- The type of the object cannot be abstract. This is diagnosed at the -- point the object is frozen, which happens after the declaration is -- fully expanded, so simply return now. if Is_Abstract_Type (Typ) then return; end if; -- First we do special processing for objects of a tagged type where -- this is the point at which the type is frozen. The creation of the -- dispatch table and the initialization procedure have to be deferred -- to this point, since we reference previously declared primitive -- subprograms. -- Force construction of dispatch tables of library level tagged types if Tagged_Type_Expansion and then Static_Dispatch_Tables and then Is_Library_Level_Entity (Def_Id) and then Is_Library_Level_Tagged_Type (Base_Typ) and then Ekind_In (Base_Typ, E_Record_Type, E_Protected_Type, E_Task_Type) and then not Has_Dispatch_Table (Base_Typ) then declare New_Nodes : List_Id := No_List; begin if Is_Concurrent_Type (Base_Typ) then New_Nodes := Make_DT (Corresponding_Record_Type (Base_Typ), N); else New_Nodes := Make_DT (Base_Typ, N); end if; if not Is_Empty_List (New_Nodes) then Insert_List_Before (N, New_Nodes); end if; end; end if; -- Make shared memory routines for shared passive variable if Is_Shared_Passive (Def_Id) then Init_After := Make_Shared_Var_Procs (N); end if; -- If tasks being declared, make sure we have an activation chain -- defined for the tasks (has no effect if we already have one), and -- also that a Master variable is established and that the appropriate -- enclosing construct is established as a task master. if Has_Task (Typ) then Build_Activation_Chain_Entity (N); Build_Master_Entity (Def_Id); end if; Check_Large_Modular_Array; -- Default initialization required, and no expression present if No (Expr) then -- If we have a type with a variant part, the initialization proc -- will contain implicit tests of the discriminant values, which -- counts as a violation of the restriction No_Implicit_Conditionals. if Has_Variant_Part (Typ) then declare Msg : Boolean; begin Check_Restriction (Msg, No_Implicit_Conditionals, Obj_Def); if Msg then Error_Msg_N ("\initialization of variant record tests discriminants", Obj_Def); return; end if; end; end if; -- For the default initialization case, if we have a private type -- with invariants, and invariant checks are enabled, then insert an -- invariant check after the object declaration. Note that it is OK -- to clobber the object with an invalid value since if the exception -- is raised, then the object will go out of scope. In the case where -- an array object is initialized with an aggregate, the expression -- is removed. Check flag Has_Init_Expression to avoid generating a -- junk invariant check and flag No_Initialization to avoid checking -- an uninitialized object such as a compiler temporary used for an -- aggregate. if Has_Invariants (Base_Typ) and then Present (Invariant_Procedure (Base_Typ)) and then not Has_Init_Expression (N) and then not No_Initialization (N) then -- If entity has an address clause or aspect, make invariant -- call into a freeze action for the explicit freeze node for -- object. Otherwise insert invariant check after declaration. if Present (Following_Address_Clause (N)) or else Has_Aspect (Def_Id, Aspect_Address) then Ensure_Freeze_Node (Def_Id); Set_Has_Delayed_Freeze (Def_Id); Set_Is_Frozen (Def_Id, False); if not Partial_View_Has_Unknown_Discr (Typ) then Append_Freeze_Action (Def_Id, Make_Invariant_Call (New_Occurrence_Of (Def_Id, Loc))); end if; elsif not Partial_View_Has_Unknown_Discr (Typ) then Insert_After (N, Make_Invariant_Call (New_Occurrence_Of (Def_Id, Loc))); end if; end if; Default_Initialize_Object (Init_After); -- Generate attribute for Persistent_BSS if needed if Persistent_BSS_Mode and then Comes_From_Source (N) and then Is_Potentially_Persistent_Type (Typ) and then not Has_Init_Expression (N) and then Is_Library_Level_Entity (Def_Id) then declare Prag : Node_Id; begin Prag := Make_Linker_Section_Pragma (Def_Id, Sloc (N), ".persistent.bss"); Insert_After (N, Prag); Analyze (Prag); end; end if; -- If access type, then we know it is null if not initialized if Is_Access_Type (Typ) then Set_Is_Known_Null (Def_Id); end if; -- Explicit initialization present else -- Obtain actual expression from qualified expression if Nkind (Expr) = N_Qualified_Expression then Expr_Q := Expression (Expr); else Expr_Q := Expr; end if; -- When we have the appropriate type of aggregate in the expression -- (it has been determined during analysis of the aggregate by -- setting the delay flag), let's perform in place assignment and -- thus avoid creating a temporary. if Is_Delayed_Aggregate (Expr_Q) then Convert_Aggr_In_Object_Decl (N); -- Ada 2005 (AI-318-02): If the initialization expression is a call -- to a build-in-place function, then access to the declared object -- must be passed to the function. Currently we limit such functions -- to those with constrained limited result subtypes, but eventually -- plan to expand the allowed forms of functions that are treated as -- build-in-place. elsif Ada_Version >= Ada_2005 and then Is_Build_In_Place_Function_Call (Expr_Q) then Make_Build_In_Place_Call_In_Object_Declaration (N, Expr_Q); -- The previous call expands the expression initializing the -- built-in-place object into further code that will be analyzed -- later. No further expansion needed here. return; -- Ada 2005 (AI-251): Rewrite the expression that initializes a -- class-wide interface object to ensure that we copy the full -- object, unless we are targetting a VM where interfaces are handled -- by VM itself. Note that if the root type of Typ is an ancestor of -- Expr's type, both types share the same dispatch table and there is -- no need to displace the pointer. elsif Is_Interface (Typ) -- Avoid never-ending recursion because if Equivalent_Type is set -- then we've done it already and must not do it again. and then not (Nkind (Obj_Def) = N_Identifier and then Present (Equivalent_Type (Entity (Obj_Def)))) then pragma Assert (Is_Class_Wide_Type (Typ)); -- If the object is a return object of an inherently limited type, -- which implies build-in-place treatment, bypass the special -- treatment of class-wide interface initialization below. In this -- case, the expansion of the return statement will take care of -- creating the object (via allocator) and initializing it. if Is_Return_Object (Def_Id) and then Is_Limited_View (Typ) then null; elsif Tagged_Type_Expansion then declare Iface : constant Entity_Id := Root_Type (Typ); Expr_N : Node_Id := Expr; Expr_Typ : Entity_Id; New_Expr : Node_Id; Obj_Id : Entity_Id; Tag_Comp : Node_Id; begin -- If the original node of the expression was a conversion -- to this specific class-wide interface type then restore -- the original node because we must copy the object before -- displacing the pointer to reference the secondary tag -- component. This code must be kept synchronized with the -- expansion done by routine Expand_Interface_Conversion if not Comes_From_Source (Expr_N) and then Nkind (Expr_N) = N_Explicit_Dereference and then Nkind (Original_Node (Expr_N)) = N_Type_Conversion and then Etype (Original_Node (Expr_N)) = Typ then Rewrite (Expr_N, Original_Node (Expression (N))); end if; -- Avoid expansion of redundant interface conversion if Is_Interface (Etype (Expr_N)) and then Nkind (Expr_N) = N_Type_Conversion and then Etype (Expr_N) = Typ then Expr_N := Expression (Expr_N); Set_Expression (N, Expr_N); end if; Obj_Id := Make_Temporary (Loc, 'D', Expr_N); Expr_Typ := Base_Type (Etype (Expr_N)); if Is_Class_Wide_Type (Expr_Typ) then Expr_Typ := Root_Type (Expr_Typ); end if; -- Replace -- CW : I'Class := Obj; -- by -- Tmp : T := Obj; -- type Ityp is not null access I'Class; -- CW : I'Class renames Ityp (Tmp.I_Tag'Address).all; if Comes_From_Source (Expr_N) and then Nkind (Expr_N) = N_Identifier and then not Is_Interface (Expr_Typ) and then Interface_Present_In_Ancestor (Expr_Typ, Typ) and then (Expr_Typ = Etype (Expr_Typ) or else not Is_Variable_Size_Record (Etype (Expr_Typ))) then -- Copy the object Insert_Action (N, Make_Object_Declaration (Loc, Defining_Identifier => Obj_Id, Object_Definition => New_Occurrence_Of (Expr_Typ, Loc), Expression => Relocate_Node (Expr_N))); -- Statically reference the tag associated with the -- interface Tag_Comp := Make_Selected_Component (Loc, Prefix => New_Occurrence_Of (Obj_Id, Loc), Selector_Name => New_Occurrence_Of (Find_Interface_Tag (Expr_Typ, Iface), Loc)); -- Replace -- IW : I'Class := Obj; -- by -- type Equiv_Record is record ... end record; -- implicit subtype CW is <Class_Wide_Subtype>; -- Tmp : CW := CW!(Obj); -- type Ityp is not null access I'Class; -- IW : I'Class renames -- Ityp!(Displace (Temp'Address, I'Tag)).all; else -- Generate the equivalent record type and update the -- subtype indication to reference it. Expand_Subtype_From_Expr (N => N, Unc_Type => Typ, Subtype_Indic => Obj_Def, Exp => Expr_N); if not Is_Interface (Etype (Expr_N)) then New_Expr := Relocate_Node (Expr_N); -- For interface types we use 'Address which displaces -- the pointer to the base of the object (if required) else New_Expr := Unchecked_Convert_To (Etype (Obj_Def), Make_Explicit_Dereference (Loc, Unchecked_Convert_To (RTE (RE_Tag_Ptr), Make_Attribute_Reference (Loc, Prefix => Relocate_Node (Expr_N), Attribute_Name => Name_Address)))); end if; -- Copy the object if not Is_Limited_Record (Expr_Typ) then Insert_Action (N, Make_Object_Declaration (Loc, Defining_Identifier => Obj_Id, Object_Definition => New_Occurrence_Of (Etype (Obj_Def), Loc), Expression => New_Expr)); -- Rename limited type object since they cannot be copied -- This case occurs when the initialization expression -- has been previously expanded into a temporary object. else pragma Assert (not Comes_From_Source (Expr_Q)); Insert_Action (N, Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Obj_Id, Subtype_Mark => New_Occurrence_Of (Etype (Obj_Def), Loc), Name => Unchecked_Convert_To (Etype (Obj_Def), New_Expr))); end if; -- Dynamically reference the tag associated with the -- interface. Tag_Comp := Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Displace), Loc), Parameter_Associations => New_List ( Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Obj_Id, Loc), Attribute_Name => Name_Address), New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Iface))), Loc))); end if; Rewrite (N, Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Make_Temporary (Loc, 'D'), Subtype_Mark => New_Occurrence_Of (Typ, Loc), Name => Convert_Tag_To_Interface (Typ, Tag_Comp))); -- If the original entity comes from source, then mark the -- new entity as needing debug information, even though it's -- defined by a generated renaming that does not come from -- source, so that Materialize_Entity will be set on the -- entity when Debug_Renaming_Declaration is called during -- analysis. if Comes_From_Source (Def_Id) then Set_Debug_Info_Needed (Defining_Identifier (N)); end if; Analyze (N, Suppress => All_Checks); -- Replace internal identifier of rewritten node by the -- identifier found in the sources. We also have to exchange -- entities containing their defining identifiers to ensure -- the correct replacement of the object declaration by this -- object renaming declaration because these identifiers -- were previously added by Enter_Name to the current scope. -- We must preserve the homonym chain of the source entity -- as well. We must also preserve the kind of the entity, -- which may be a constant. Preserve entity chain because -- itypes may have been generated already, and the full -- chain must be preserved for final freezing. Finally, -- preserve Comes_From_Source setting, so that debugging -- and cross-referencing information is properly kept, and -- preserve source location, to prevent spurious errors when -- entities are declared (they must have their own Sloc). declare New_Id : constant Entity_Id := Defining_Identifier (N); Next_Temp : constant Entity_Id := Next_Entity (New_Id); S_Flag : constant Boolean := Comes_From_Source (Def_Id); begin Set_Next_Entity (New_Id, Next_Entity (Def_Id)); Set_Next_Entity (Def_Id, Next_Temp); Set_Chars (Defining_Identifier (N), Chars (Def_Id)); Set_Homonym (Defining_Identifier (N), Homonym (Def_Id)); Set_Ekind (Defining_Identifier (N), Ekind (Def_Id)); Set_Sloc (Defining_Identifier (N), Sloc (Def_Id)); Set_Comes_From_Source (Def_Id, False); Exchange_Entities (Defining_Identifier (N), Def_Id); Set_Comes_From_Source (Def_Id, S_Flag); end; end; end if; return; -- Common case of explicit object initialization else -- In most cases, we must check that the initial value meets any -- constraint imposed by the declared type. However, there is one -- very important exception to this rule. If the entity has an -- unconstrained nominal subtype, then it acquired its constraints -- from the expression in the first place, and not only does this -- mean that the constraint check is not needed, but an attempt to -- perform the constraint check can cause order of elaboration -- problems. if not Is_Constr_Subt_For_U_Nominal (Typ) then -- If this is an allocator for an aggregate that has been -- allocated in place, delay checks until assignments are -- made, because the discriminants are not initialized. if Nkind (Expr) = N_Allocator and then No_Initialization (Expr) then null; -- Otherwise apply a constraint check now if no prev error elsif Nkind (Expr) /= N_Error then Apply_Constraint_Check (Expr, Typ); -- Deal with possible range check if Do_Range_Check (Expr) then -- If assignment checks are suppressed, turn off flag if Suppress_Assignment_Checks (N) then Set_Do_Range_Check (Expr, False); -- Otherwise generate the range check else Generate_Range_Check (Expr, Typ, CE_Range_Check_Failed); end if; end if; end if; end if; -- If the type is controlled and not inherently limited, then -- the target is adjusted after the copy and attached to the -- finalization list. However, no adjustment is done in the case -- where the object was initialized by a call to a function whose -- result is built in place, since no copy occurred. (Eventually -- we plan to support in-place function results for some cases -- of nonlimited types. ???) Similarly, no adjustment is required -- if we are going to rewrite the object declaration into a -- renaming declaration. if Needs_Finalization (Typ) and then not Is_Limited_View (Typ) and then not Rewrite_As_Renaming then Adj_Call := Make_Adjust_Call ( Obj_Ref => New_Occurrence_Of (Def_Id, Loc), Typ => Base_Typ); -- Guard against a missing [Deep_]Adjust when the base type -- was not properly frozen. if Present (Adj_Call) then Insert_Action_After (Init_After, Adj_Call); end if; end if; -- For tagged types, when an init value is given, the tag has to -- be re-initialized separately in order to avoid the propagation -- of a wrong tag coming from a view conversion unless the type -- is class wide (in this case the tag comes from the init value). -- Suppress the tag assignment when not Tagged_Type_Expansion -- because tags are represented implicitly in objects. Ditto for -- types that are CPP_CLASS, and for initializations that are -- aggregates, because they have to have the right tag. -- The re-assignment of the tag has to be done even if the object -- is a constant. The assignment must be analyzed after the -- declaration. If an address clause follows, this is handled as -- part of the freeze actions for the object, otherwise insert -- tag assignment here. Tag_Assign := Make_Tag_Assignment (N); if Present (Tag_Assign) then if Present (Following_Address_Clause (N)) then Ensure_Freeze_Node (Def_Id); else Insert_Action_After (Init_After, Tag_Assign); end if; -- Handle C++ constructor calls. Note that we do not check that -- Typ is a tagged type since the equivalent Ada type of a C++ -- class that has no virtual methods is an untagged limited -- record type. elsif Is_CPP_Constructor_Call (Expr) then -- The call to the initialization procedure does NOT freeze the -- object being initialized. Id_Ref := New_Occurrence_Of (Def_Id, Loc); Set_Must_Not_Freeze (Id_Ref); Set_Assignment_OK (Id_Ref); Insert_Actions_After (Init_After, Build_Initialization_Call (Loc, Id_Ref, Typ, Constructor_Ref => Expr)); -- We remove here the original call to the constructor -- to avoid its management in the backend Set_Expression (N, Empty); return; -- Handle initialization of limited tagged types elsif Is_Tagged_Type (Typ) and then Is_Class_Wide_Type (Typ) and then Is_Limited_Record (Typ) and then not Is_Limited_Interface (Typ) then -- Given that the type is limited we cannot perform a copy. If -- Expr_Q is the reference to a variable we mark the variable -- as OK_To_Rename to expand this declaration into a renaming -- declaration (see bellow). if Is_Entity_Name (Expr_Q) then Set_OK_To_Rename (Entity (Expr_Q)); -- If we cannot convert the expression into a renaming we must -- consider it an internal error because the backend does not -- have support to handle it. else pragma Assert (False); raise Program_Error; end if; -- For discrete types, set the Is_Known_Valid flag if the -- initializing value is known to be valid. Only do this for -- source assignments, since otherwise we can end up turning -- on the known valid flag prematurely from inserted code. elsif Comes_From_Source (N) and then Is_Discrete_Type (Typ) and then Expr_Known_Valid (Expr) then Set_Is_Known_Valid (Def_Id); elsif Is_Access_Type (Typ) then -- For access types set the Is_Known_Non_Null flag if the -- initializing value is known to be non-null. We can also set -- Can_Never_Be_Null if this is a constant. if Known_Non_Null (Expr) then Set_Is_Known_Non_Null (Def_Id, True); if Constant_Present (N) then Set_Can_Never_Be_Null (Def_Id); end if; end if; end if; -- If validity checking on copies, validate initial expression. -- But skip this if declaration is for a generic type, since it -- makes no sense to validate generic types. Not clear if this -- can happen for legal programs, but it definitely can arise -- from previous instantiation errors. if Validity_Checks_On and then Comes_From_Source (N) and then Validity_Check_Copies and then not Is_Generic_Type (Etype (Def_Id)) then Ensure_Valid (Expr); Set_Is_Known_Valid (Def_Id); end if; end if; -- Cases where the back end cannot handle the initialization directly -- In such cases, we expand an assignment that will be appropriately -- handled by Expand_N_Assignment_Statement. -- The exclusion of the unconstrained case is wrong, but for now it -- is too much trouble ??? if (Is_Possibly_Unaligned_Slice (Expr) or else (Is_Possibly_Unaligned_Object (Expr) and then not Represented_As_Scalar (Etype (Expr)))) and then not (Is_Array_Type (Etype (Expr)) and then not Is_Constrained (Etype (Expr))) then declare Stat : constant Node_Id := Make_Assignment_Statement (Loc, Name => New_Occurrence_Of (Def_Id, Loc), Expression => Relocate_Node (Expr)); begin Set_Expression (N, Empty); Set_No_Initialization (N); Set_Assignment_OK (Name (Stat)); Set_No_Ctrl_Actions (Stat); Insert_After_And_Analyze (Init_After, Stat); end; end if; end if; if Nkind (Obj_Def) = N_Access_Definition and then not Is_Local_Anonymous_Access (Etype (Def_Id)) then -- An Ada 2012 stand-alone object of an anonymous access type declare Loc : constant Source_Ptr := Sloc (N); Level : constant Entity_Id := Make_Defining_Identifier (Sloc (N), Chars => New_External_Name (Chars (Def_Id), Suffix => "L")); Level_Expr : Node_Id; Level_Decl : Node_Id; begin Set_Ekind (Level, Ekind (Def_Id)); Set_Etype (Level, Standard_Natural); Set_Scope (Level, Scope (Def_Id)); if No (Expr) then -- Set accessibility level of null Level_Expr := Make_Integer_Literal (Loc, Scope_Depth (Standard_Standard)); else Level_Expr := Dynamic_Accessibility_Level (Expr); end if; Level_Decl := Make_Object_Declaration (Loc, Defining_Identifier => Level, Object_Definition => New_Occurrence_Of (Standard_Natural, Loc), Expression => Level_Expr, Constant_Present => Constant_Present (N), Has_Init_Expression => True); Insert_Action_After (Init_After, Level_Decl); Set_Extra_Accessibility (Def_Id, Level); end; end if; -- If the object is default initialized and its type is subject to -- pragma Default_Initial_Condition, add a runtime check to verify -- the assumption of the pragma (SPARK RM 7.3.3). Generate: -- <Base_Typ>DIC (<Base_Typ> (Def_Id)); -- Note that the check is generated for source objects only if Comes_From_Source (Def_Id) and then Has_DIC (Typ) and then Present (DIC_Procedure (Typ)) and then not Has_Init_Expression (N) then declare DIC_Call : constant Node_Id := Build_DIC_Call (Loc, Def_Id, Typ); begin if Present (Next_N) then Insert_Before_And_Analyze (Next_N, DIC_Call); -- The object declaration is the last node in a declarative or a -- statement list. else Append_To (List_Containing (N), DIC_Call); Analyze (DIC_Call); end if; end; end if; -- Final transformation - turn the object declaration into a renaming -- if appropriate. If this is the completion of a deferred constant -- declaration, then this transformation generates what would be -- illegal code if written by hand, but that's OK. if Present (Expr) then if Rewrite_As_Renaming then Rewrite (N, Make_Object_Renaming_Declaration (Loc, Defining_Identifier => Defining_Identifier (N), Subtype_Mark => Obj_Def, Name => Expr_Q)); -- We do not analyze this renaming declaration, because all its -- components have already been analyzed, and if we were to go -- ahead and analyze it, we would in effect be trying to generate -- another declaration of X, which won't do. Set_Renamed_Object (Defining_Identifier (N), Expr_Q); Set_Analyzed (N); -- We do need to deal with debug issues for this renaming -- First, if entity comes from source, then mark it as needing -- debug information, even though it is defined by a generated -- renaming that does not come from source. if Comes_From_Source (Defining_Identifier (N)) then Set_Debug_Info_Needed (Defining_Identifier (N)); end if; -- Now call the routine to generate debug info for the renaming declare Decl : constant Node_Id := Debug_Renaming_Declaration (N); begin if Present (Decl) then Insert_Action (N, Decl); end if; end; end if; end if; -- Exception on library entity not available exception when RE_Not_Available => return; end Expand_N_Object_Declaration; --------------------------------- -- Expand_N_Subtype_Indication -- --------------------------------- -- Add a check on the range of the subtype. The static case is partially -- duplicated by Process_Range_Expr_In_Decl in Sem_Ch3, but we still need -- to check here for the static case in order to avoid generating -- extraneous expanded code. Also deal with validity checking. procedure Expand_N_Subtype_Indication (N : Node_Id) is Ran : constant Node_Id := Range_Expression (Constraint (N)); Typ : constant Entity_Id := Entity (Subtype_Mark (N)); begin if Nkind (Constraint (N)) = N_Range_Constraint then Validity_Check_Range (Range_Expression (Constraint (N))); end if; if Nkind_In (Parent (N), N_Constrained_Array_Definition, N_Slice) then Apply_Range_Check (Ran, Typ); end if; end Expand_N_Subtype_Indication; --------------------------- -- Expand_N_Variant_Part -- --------------------------- -- Note: this procedure no longer has any effect. It used to be that we -- would replace the choices in the last variant by a when others, and -- also expanded static predicates in variant choices here, but both of -- those activities were being done too early, since we can't check the -- choices until the statically predicated subtypes are frozen, which can -- happen as late as the free point of the record, and we can't change the -- last choice to an others before checking the choices, which is now done -- at the freeze point of the record. procedure Expand_N_Variant_Part (N : Node_Id) is begin null; end Expand_N_Variant_Part; --------------------------------- -- Expand_Previous_Access_Type -- --------------------------------- procedure Expand_Previous_Access_Type (Def_Id : Entity_Id) is Ptr_Typ : Entity_Id; begin -- Find all access types in the current scope whose designated type is -- Def_Id and build master renamings for them. Ptr_Typ := First_Entity (Current_Scope); while Present (Ptr_Typ) loop if Is_Access_Type (Ptr_Typ) and then Designated_Type (Ptr_Typ) = Def_Id and then No (Master_Id (Ptr_Typ)) then -- Ensure that the designated type has a master Build_Master_Entity (Def_Id); -- Private and incomplete types complicate the insertion of master -- renamings because the access type may precede the full view of -- the designated type. For this reason, the master renamings are -- inserted relative to the designated type. Build_Master_Renaming (Ptr_Typ, Ins_Nod => Parent (Def_Id)); end if; Next_Entity (Ptr_Typ); end loop; end Expand_Previous_Access_Type; ----------------------------- -- Expand_Record_Extension -- ----------------------------- -- Add a field _parent at the beginning of the record extension. This is -- used to implement inheritance. Here are some examples of expansion: -- 1. no discriminants -- type T2 is new T1 with null record; -- gives -- type T2 is new T1 with record -- _Parent : T1; -- end record; -- 2. renamed discriminants -- type T2 (B, C : Int) is new T1 (A => B) with record -- _Parent : T1 (A => B); -- D : Int; -- end; -- 3. inherited discriminants -- type T2 is new T1 with record -- discriminant A inherited -- _Parent : T1 (A); -- D : Int; -- end; procedure Expand_Record_Extension (T : Entity_Id; Def : Node_Id) is Indic : constant Node_Id := Subtype_Indication (Def); Loc : constant Source_Ptr := Sloc (Def); Rec_Ext_Part : Node_Id := Record_Extension_Part (Def); Par_Subtype : Entity_Id; Comp_List : Node_Id; Comp_Decl : Node_Id; Parent_N : Node_Id; D : Entity_Id; List_Constr : constant List_Id := New_List; begin -- Expand_Record_Extension is called directly from the semantics, so -- we must check to see whether expansion is active before proceeding, -- because this affects the visibility of selected components in bodies -- of instances. if not Expander_Active then return; end if; -- This may be a derivation of an untagged private type whose full -- view is tagged, in which case the Derived_Type_Definition has no -- extension part. Build an empty one now. if No (Rec_Ext_Part) then Rec_Ext_Part := Make_Record_Definition (Loc, End_Label => Empty, Component_List => Empty, Null_Present => True); Set_Record_Extension_Part (Def, Rec_Ext_Part); Mark_Rewrite_Insertion (Rec_Ext_Part); end if; Comp_List := Component_List (Rec_Ext_Part); Parent_N := Make_Defining_Identifier (Loc, Name_uParent); -- If the derived type inherits its discriminants the type of the -- _parent field must be constrained by the inherited discriminants if Has_Discriminants (T) and then Nkind (Indic) /= N_Subtype_Indication and then not Is_Constrained (Entity (Indic)) then D := First_Discriminant (T); while Present (D) loop Append_To (List_Constr, New_Occurrence_Of (D, Loc)); Next_Discriminant (D); end loop; Par_Subtype := Process_Subtype ( Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (Entity (Indic), Loc), Constraint => Make_Index_Or_Discriminant_Constraint (Loc, Constraints => List_Constr)), Def); -- Otherwise the original subtype_indication is just what is needed else Par_Subtype := Process_Subtype (New_Copy_Tree (Indic), Def); end if; Set_Parent_Subtype (T, Par_Subtype); Comp_Decl := Make_Component_Declaration (Loc, Defining_Identifier => Parent_N, Component_Definition => Make_Component_Definition (Loc, Aliased_Present => False, Subtype_Indication => New_Occurrence_Of (Par_Subtype, Loc))); if Null_Present (Rec_Ext_Part) then Set_Component_List (Rec_Ext_Part, Make_Component_List (Loc, Component_Items => New_List (Comp_Decl), Variant_Part => Empty, Null_Present => False)); Set_Null_Present (Rec_Ext_Part, False); elsif Null_Present (Comp_List) or else Is_Empty_List (Component_Items (Comp_List)) then Set_Component_Items (Comp_List, New_List (Comp_Decl)); Set_Null_Present (Comp_List, False); else Insert_Before (First (Component_Items (Comp_List)), Comp_Decl); end if; Analyze (Comp_Decl); end Expand_Record_Extension; ------------------------ -- Expand_Tagged_Root -- ------------------------ procedure Expand_Tagged_Root (T : Entity_Id) is Def : constant Node_Id := Type_Definition (Parent (T)); Comp_List : Node_Id; Comp_Decl : Node_Id; Sloc_N : Source_Ptr; begin if Null_Present (Def) then Set_Component_List (Def, Make_Component_List (Sloc (Def), Component_Items => Empty_List, Variant_Part => Empty, Null_Present => True)); end if; Comp_List := Component_List (Def); if Null_Present (Comp_List) or else Is_Empty_List (Component_Items (Comp_List)) then Sloc_N := Sloc (Comp_List); else Sloc_N := Sloc (First (Component_Items (Comp_List))); end if; Comp_Decl := Make_Component_Declaration (Sloc_N, Defining_Identifier => First_Tag_Component (T), Component_Definition => Make_Component_Definition (Sloc_N, Aliased_Present => False, Subtype_Indication => New_Occurrence_Of (RTE (RE_Tag), Sloc_N))); if Null_Present (Comp_List) or else Is_Empty_List (Component_Items (Comp_List)) then Set_Component_Items (Comp_List, New_List (Comp_Decl)); Set_Null_Present (Comp_List, False); else Insert_Before (First (Component_Items (Comp_List)), Comp_Decl); end if; -- We don't Analyze the whole expansion because the tag component has -- already been analyzed previously. Here we just insure that the tree -- is coherent with the semantic decoration Find_Type (Subtype_Indication (Component_Definition (Comp_Decl))); exception when RE_Not_Available => return; end Expand_Tagged_Root; ------------------------------ -- Freeze_Stream_Operations -- ------------------------------ procedure Freeze_Stream_Operations (N : Node_Id; Typ : Entity_Id) is Names : constant array (1 .. 4) of TSS_Name_Type := (TSS_Stream_Input, TSS_Stream_Output, TSS_Stream_Read, TSS_Stream_Write); Stream_Op : Entity_Id; begin -- Primitive operations of tagged types are frozen when the dispatch -- table is constructed. if not Comes_From_Source (Typ) or else Is_Tagged_Type (Typ) then return; end if; for J in Names'Range loop Stream_Op := TSS (Typ, Names (J)); if Present (Stream_Op) and then Is_Subprogram (Stream_Op) and then Nkind (Unit_Declaration_Node (Stream_Op)) = N_Subprogram_Declaration and then not Is_Frozen (Stream_Op) then Append_Freeze_Actions (Typ, Freeze_Entity (Stream_Op, N)); end if; end loop; end Freeze_Stream_Operations; ----------------- -- Freeze_Type -- ----------------- -- Full type declarations are expanded at the point at which the type is -- frozen. The formal N is the Freeze_Node for the type. Any statements or -- declarations generated by the freezing (e.g. the procedure generated -- for initialization) are chained in the Actions field list of the freeze -- node using Append_Freeze_Actions. -- WARNING: This routine manages Ghost regions. Return statements must be -- replaced by gotos which jump to the end of the routine and restore the -- Ghost mode. function Freeze_Type (N : Node_Id) return Boolean is procedure Process_RACW_Types (Typ : Entity_Id); -- Validate and generate stubs for all RACW types associated with type -- Typ. procedure Process_Pending_Access_Types (Typ : Entity_Id); -- Associate type Typ's Finalize_Address primitive with the finalization -- masters of pending access-to-Typ types. ------------------------ -- Process_RACW_Types -- ------------------------ procedure Process_RACW_Types (Typ : Entity_Id) is List : constant Elist_Id := Access_Types_To_Process (N); E : Elmt_Id; Seen : Boolean := False; begin if Present (List) then E := First_Elmt (List); while Present (E) loop if Is_Remote_Access_To_Class_Wide_Type (Node (E)) then Validate_RACW_Primitives (Node (E)); Seen := True; end if; Next_Elmt (E); end loop; end if; -- If there are RACWs designating this type, make stubs now if Seen then Remote_Types_Tagged_Full_View_Encountered (Typ); end if; end Process_RACW_Types; ---------------------------------- -- Process_Pending_Access_Types -- ---------------------------------- procedure Process_Pending_Access_Types (Typ : Entity_Id) is E : Elmt_Id; begin -- Finalize_Address is not generated in CodePeer mode because the -- body contains address arithmetic. This processing is disabled. if CodePeer_Mode then null; -- Certain itypes are generated for contexts that cannot allocate -- objects and should not set primitive Finalize_Address. elsif Is_Itype (Typ) and then Nkind (Associated_Node_For_Itype (Typ)) = N_Explicit_Dereference then null; -- When an access type is declared after the incomplete view of a -- Taft-amendment type, the access type is considered pending in -- case the full view of the Taft-amendment type is controlled. If -- this is indeed the case, associate the Finalize_Address routine -- of the full view with the finalization masters of all pending -- access types. This scenario applies to anonymous access types as -- well. elsif Needs_Finalization (Typ) and then Present (Pending_Access_Types (Typ)) then E := First_Elmt (Pending_Access_Types (Typ)); while Present (E) loop -- Generate: -- Set_Finalize_Address -- (Ptr_Typ, <Typ>FD'Unrestricted_Access); Append_Freeze_Action (Typ, Make_Set_Finalize_Address_Call (Loc => Sloc (N), Ptr_Typ => Node (E))); Next_Elmt (E); end loop; end if; end Process_Pending_Access_Types; -- Local variables Def_Id : constant Entity_Id := Entity (N); Mode : Ghost_Mode_Type; Mode_Set : Boolean := False; Result : Boolean := False; -- Start of processing for Freeze_Type begin -- The type being frozen may be subject to pragma Ghost. Set the mode -- now to ensure that any nodes generated during freezing are properly -- marked as Ghost. Set_Ghost_Mode (Def_Id, Mode); Mode_Set := True; -- Process any remote access-to-class-wide types designating the type -- being frozen. Process_RACW_Types (Def_Id); -- Freeze processing for record types if Is_Record_Type (Def_Id) then if Ekind (Def_Id) = E_Record_Type then Expand_Freeze_Record_Type (N); elsif Is_Class_Wide_Type (Def_Id) then Expand_Freeze_Class_Wide_Type (N); end if; -- Freeze processing for array types elsif Is_Array_Type (Def_Id) then Expand_Freeze_Array_Type (N); -- Freeze processing for access types -- For pool-specific access types, find out the pool object used for -- this type, needs actual expansion of it in some cases. Here are the -- different cases : -- 1. Rep Clause "for Def_Id'Storage_Size use 0;" -- ---> don't use any storage pool -- 2. Rep Clause : for Def_Id'Storage_Size use Expr. -- Expand: -- Def_Id__Pool : Stack_Bounded_Pool (Expr, DT'Size, DT'Alignment); -- 3. Rep Clause "for Def_Id'Storage_Pool use a_Pool_Object" -- ---> Storage Pool is the specified one -- See GNAT Pool packages in the Run-Time for more details elsif Ekind_In (Def_Id, E_Access_Type, E_General_Access_Type) then declare Loc : constant Source_Ptr := Sloc (N); Desig_Type : constant Entity_Id := Designated_Type (Def_Id); Freeze_Action_Typ : Entity_Id; Pool_Object : Entity_Id; begin -- Case 1 -- Rep Clause "for Def_Id'Storage_Size use 0;" -- ---> don't use any storage pool if No_Pool_Assigned (Def_Id) then null; -- Case 2 -- Rep Clause : for Def_Id'Storage_Size use Expr. -- ---> Expand: -- Def_Id__Pool : Stack_Bounded_Pool -- (Expr, DT'Size, DT'Alignment); elsif Has_Storage_Size_Clause (Def_Id) then declare DT_Align : Node_Id; DT_Size : Node_Id; begin -- For unconstrained composite types we give a size of zero -- so that the pool knows that it needs a special algorithm -- for variable size object allocation. if Is_Composite_Type (Desig_Type) and then not Is_Constrained (Desig_Type) then DT_Size := Make_Integer_Literal (Loc, 0); DT_Align := Make_Integer_Literal (Loc, Maximum_Alignment); else DT_Size := Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Desig_Type, Loc), Attribute_Name => Name_Max_Size_In_Storage_Elements); DT_Align := Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (Desig_Type, Loc), Attribute_Name => Name_Alignment); end if; Pool_Object := Make_Defining_Identifier (Loc, Chars => New_External_Name (Chars (Def_Id), 'P')); -- We put the code associated with the pools in the entity -- that has the later freeze node, usually the access type -- but it can also be the designated_type; because the pool -- code requires both those types to be frozen if Is_Frozen (Desig_Type) and then (No (Freeze_Node (Desig_Type)) or else Analyzed (Freeze_Node (Desig_Type))) then Freeze_Action_Typ := Def_Id; -- A Taft amendment type cannot get the freeze actions -- since the full view is not there. elsif Is_Incomplete_Or_Private_Type (Desig_Type) and then No (Full_View (Desig_Type)) then Freeze_Action_Typ := Def_Id; else Freeze_Action_Typ := Desig_Type; end if; Append_Freeze_Action (Freeze_Action_Typ, Make_Object_Declaration (Loc, Defining_Identifier => Pool_Object, Object_Definition => Make_Subtype_Indication (Loc, Subtype_Mark => New_Occurrence_Of (RTE (RE_Stack_Bounded_Pool), Loc), Constraint => Make_Index_Or_Discriminant_Constraint (Loc, Constraints => New_List ( -- First discriminant is the Pool Size New_Occurrence_Of ( Storage_Size_Variable (Def_Id), Loc), -- Second discriminant is the element size DT_Size, -- Third discriminant is the alignment DT_Align))))); end; Set_Associated_Storage_Pool (Def_Id, Pool_Object); -- Case 3 -- Rep Clause "for Def_Id'Storage_Pool use a_Pool_Object" -- ---> Storage Pool is the specified one -- When compiling in Ada 2012 mode, ensure that the accessibility -- level of the subpool access type is not deeper than that of the -- pool_with_subpools. elsif Ada_Version >= Ada_2012 and then Present (Associated_Storage_Pool (Def_Id)) -- Omit this check for the case of a configurable run-time that -- does not provide package System.Storage_Pools.Subpools. and then RTE_Available (RE_Root_Storage_Pool_With_Subpools) then declare Loc : constant Source_Ptr := Sloc (Def_Id); Pool : constant Entity_Id := Associated_Storage_Pool (Def_Id); RSPWS : constant Entity_Id := RTE (RE_Root_Storage_Pool_With_Subpools); begin -- It is known that the accessibility level of the access -- type is deeper than that of the pool. if Type_Access_Level (Def_Id) > Object_Access_Level (Pool) and then not Accessibility_Checks_Suppressed (Def_Id) and then not Accessibility_Checks_Suppressed (Pool) then -- Static case: the pool is known to be a descendant of -- Root_Storage_Pool_With_Subpools. if Is_Ancestor (RSPWS, Etype (Pool)) then Error_Msg_N ("??subpool access type has deeper accessibility " & "level than pool", Def_Id); Append_Freeze_Action (Def_Id, Make_Raise_Program_Error (Loc, Reason => PE_Accessibility_Check_Failed)); -- Dynamic case: when the pool is of a class-wide type, -- it may or may not support subpools depending on the -- path of derivation. Generate: -- if Def_Id in RSPWS'Class then -- raise Program_Error; -- end if; elsif Is_Class_Wide_Type (Etype (Pool)) then Append_Freeze_Action (Def_Id, Make_If_Statement (Loc, Condition => Make_In (Loc, Left_Opnd => New_Occurrence_Of (Pool, Loc), Right_Opnd => New_Occurrence_Of (Class_Wide_Type (RSPWS), Loc)), Then_Statements => New_List ( Make_Raise_Program_Error (Loc, Reason => PE_Accessibility_Check_Failed)))); end if; end if; end; end if; -- For access-to-controlled types (including class-wide types and -- Taft-amendment types, which potentially have controlled -- components), expand the list controller object that will store -- the dynamically allocated objects. Don't do this transformation -- for expander-generated access types, but do it for types that -- are the full view of types derived from other private types. -- Also suppress the list controller in the case of a designated -- type with convention Java, since this is used when binding to -- Java API specs, where there's no equivalent of a finalization -- list and we don't want to pull in the finalization support if -- not needed. if not Comes_From_Source (Def_Id) and then not Has_Private_Declaration (Def_Id) then null; -- An exception is made for types defined in the run-time because -- Ada.Tags.Tag itself is such a type and cannot afford this -- unnecessary overhead that would generates a loop in the -- expansion scheme. Another exception is if Restrictions -- (No_Finalization) is active, since then we know nothing is -- controlled. elsif Restriction_Active (No_Finalization) or else In_Runtime (Def_Id) then null; -- Create a finalization master for an access-to-controlled type -- or an access-to-incomplete type. It is assumed that the full -- view will be controlled. elsif Needs_Finalization (Desig_Type) or else (Is_Incomplete_Type (Desig_Type) and then No (Full_View (Desig_Type))) then Build_Finalization_Master (Def_Id); -- Create a finalization master when the designated type contains -- a private component. It is assumed that the full view will be -- controlled. elsif Has_Private_Component (Desig_Type) then Build_Finalization_Master (Typ => Def_Id, For_Private => True, Context_Scope => Scope (Def_Id), Insertion_Node => Declaration_Node (Desig_Type)); end if; end; -- Freeze processing for enumeration types elsif Ekind (Def_Id) = E_Enumeration_Type then -- We only have something to do if we have a non-standard -- representation (i.e. at least one literal whose pos value -- is not the same as its representation) if Has_Non_Standard_Rep (Def_Id) then Expand_Freeze_Enumeration_Type (N); end if; -- Private types that are completed by a derivation from a private -- type have an internally generated full view, that needs to be -- frozen. This must be done explicitly because the two views share -- the freeze node, and the underlying full view is not visible when -- the freeze node is analyzed. elsif Is_Private_Type (Def_Id) and then Is_Derived_Type (Def_Id) and then Present (Full_View (Def_Id)) and then Is_Itype (Full_View (Def_Id)) and then Has_Private_Declaration (Full_View (Def_Id)) and then Freeze_Node (Full_View (Def_Id)) = N then Set_Entity (N, Full_View (Def_Id)); Result := Freeze_Type (N); Set_Entity (N, Def_Id); -- All other types require no expander action. There are such cases -- (e.g. task types and protected types). In such cases, the freeze -- nodes are there for use by Gigi. end if; -- Complete the initialization of all pending access types' finalization -- masters now that the designated type has been is frozen and primitive -- Finalize_Address generated. Process_Pending_Access_Types (Def_Id); Freeze_Stream_Operations (N, Def_Id); -- Generate the [spec and] body of the procedure tasked with the runtime -- verification of pragma Default_Initial_Condition's expression. if Has_DIC (Def_Id) then Build_DIC_Procedure_Body (Def_Id); end if; -- Generate the [spec and] body of the invariant procedure tasked with -- the runtime verification of all invariants that pertain to the type. -- This includes invariants on the partial and full view, inherited -- class-wide invariants from parent types or interfaces, and invariants -- on array elements or record components. -- Do not generate invariant procedure within other assertion -- subprograms, which may involve local declarations of local -- subtypes to which these checks don't apply. if Has_Invariants (Def_Id) then if Within_Internal_Subprogram or else (Ekind (Current_Scope) = E_Function and then Is_Predicate_Function (Current_Scope)) then null; else Build_Invariant_Procedure_Body (Def_Id); end if; end if; if Mode_Set then Restore_Ghost_Mode (Mode); end if; return Result; exception when RE_Not_Available => if Mode_Set then Restore_Ghost_Mode (Mode); end if; return False; end Freeze_Type; ------------------------- -- Get_Simple_Init_Val -- ------------------------- function Get_Simple_Init_Val (T : Entity_Id; N : Node_Id; Size : Uint := No_Uint) return Node_Id is Loc : constant Source_Ptr := Sloc (N); Val : Node_Id; Result : Node_Id; Val_RE : RE_Id; Size_To_Use : Uint; -- This is the size to be used for computation of the appropriate -- initial value for the Normalize_Scalars and Initialize_Scalars case. IV_Attribute : constant Boolean := Nkind (N) = N_Attribute_Reference and then Attribute_Name (N) = Name_Invalid_Value; Lo_Bound : Uint; Hi_Bound : Uint; -- These are the values computed by the procedure Check_Subtype_Bounds procedure Check_Subtype_Bounds; -- This procedure examines the subtype T, and its ancestor subtypes and -- derived types to determine the best known information about the -- bounds of the subtype. After the call Lo_Bound is set either to -- No_Uint if no information can be determined, or to a value which -- represents a known low bound, i.e. a valid value of the subtype can -- not be less than this value. Hi_Bound is similarly set to a known -- high bound (valid value cannot be greater than this). -------------------------- -- Check_Subtype_Bounds -- -------------------------- procedure Check_Subtype_Bounds is ST1 : Entity_Id; ST2 : Entity_Id; Lo : Node_Id; Hi : Node_Id; Loval : Uint; Hival : Uint; begin Lo_Bound := No_Uint; Hi_Bound := No_Uint; -- Loop to climb ancestor subtypes and derived types ST1 := T; loop if not Is_Discrete_Type (ST1) then return; end if; Lo := Type_Low_Bound (ST1); Hi := Type_High_Bound (ST1); if Compile_Time_Known_Value (Lo) then Loval := Expr_Value (Lo); if Lo_Bound = No_Uint or else Lo_Bound < Loval then Lo_Bound := Loval; end if; end if; if Compile_Time_Known_Value (Hi) then Hival := Expr_Value (Hi); if Hi_Bound = No_Uint or else Hi_Bound > Hival then Hi_Bound := Hival; end if; end if; ST2 := Ancestor_Subtype (ST1); if No (ST2) then ST2 := Etype (ST1); end if; exit when ST1 = ST2; ST1 := ST2; end loop; end Check_Subtype_Bounds; -- Start of processing for Get_Simple_Init_Val begin -- For a private type, we should always have an underlying type (because -- this was already checked in Needs_Simple_Initialization). What we do -- is to get the value for the underlying type and then do an unchecked -- conversion to the private type. if Is_Private_Type (T) then Val := Get_Simple_Init_Val (Underlying_Type (T), N, Size); -- A special case, if the underlying value is null, then qualify it -- with the underlying type, so that the null is properly typed. -- Similarly, if it is an aggregate it must be qualified, because an -- unchecked conversion does not provide a context for it. if Nkind_In (Val, N_Null, N_Aggregate) then Val := Make_Qualified_Expression (Loc, Subtype_Mark => New_Occurrence_Of (Underlying_Type (T), Loc), Expression => Val); end if; Result := Unchecked_Convert_To (T, Val); -- Don't truncate result (important for Initialize/Normalize_Scalars) if Nkind (Result) = N_Unchecked_Type_Conversion and then Is_Scalar_Type (Underlying_Type (T)) then Set_No_Truncation (Result); end if; return Result; -- Scalars with Default_Value aspect. The first subtype may now be -- private, so retrieve value from underlying type. elsif Is_Scalar_Type (T) and then Has_Default_Aspect (T) then if Is_Private_Type (First_Subtype (T)) then return Unchecked_Convert_To (T, Default_Aspect_Value (Full_View (First_Subtype (T)))); else return Convert_To (T, Default_Aspect_Value (First_Subtype (T))); end if; -- Otherwise, for scalars, we must have normalize/initialize scalars -- case, or if the node N is an 'Invalid_Value attribute node. elsif Is_Scalar_Type (T) then pragma Assert (Init_Or_Norm_Scalars or IV_Attribute); -- Compute size of object. If it is given by the caller, we can use -- it directly, otherwise we use Esize (T) as an estimate. As far as -- we know this covers all cases correctly. if Size = No_Uint or else Size <= Uint_0 then Size_To_Use := UI_Max (Uint_1, Esize (T)); else Size_To_Use := Size; end if; -- Maximum size to use is 64 bits, since we will create values of -- type Unsigned_64 and the range must fit this type. if Size_To_Use /= No_Uint and then Size_To_Use > Uint_64 then Size_To_Use := Uint_64; end if; -- Check known bounds of subtype Check_Subtype_Bounds; -- Processing for Normalize_Scalars case if Normalize_Scalars and then not IV_Attribute then -- If zero is invalid, it is a convenient value to use that is -- for sure an appropriate invalid value in all situations. if Lo_Bound /= No_Uint and then Lo_Bound > Uint_0 then Val := Make_Integer_Literal (Loc, 0); -- Cases where all one bits is the appropriate invalid value -- For modular types, all 1 bits is either invalid or valid. If -- it is valid, then there is nothing that can be done since there -- are no invalid values (we ruled out zero already). -- For signed integer types that have no negative values, either -- there is room for negative values, or there is not. If there -- is, then all 1-bits may be interpreted as minus one, which is -- certainly invalid. Alternatively it is treated as the largest -- positive value, in which case the observation for modular types -- still applies. -- For float types, all 1-bits is a NaN (not a number), which is -- certainly an appropriately invalid value. elsif Is_Unsigned_Type (T) or else Is_Floating_Point_Type (T) or else Is_Enumeration_Type (T) then Val := Make_Integer_Literal (Loc, 2 ** Size_To_Use - 1); -- Resolve as Unsigned_64, because the largest number we can -- generate is out of range of universal integer. Analyze_And_Resolve (Val, RTE (RE_Unsigned_64)); -- Case of signed types else declare Signed_Size : constant Uint := UI_Min (Uint_63, Size_To_Use - 1); begin -- Normally we like to use the most negative number. The one -- exception is when this number is in the known subtype -- range and the largest positive number is not in the known -- subtype range. -- For this exceptional case, use largest positive value if Lo_Bound /= No_Uint and then Hi_Bound /= No_Uint and then Lo_Bound <= (-(2 ** Signed_Size)) and then Hi_Bound < 2 ** Signed_Size then Val := Make_Integer_Literal (Loc, 2 ** Signed_Size - 1); -- Normal case of largest negative value else Val := Make_Integer_Literal (Loc, -(2 ** Signed_Size)); end if; end; end if; -- Here for Initialize_Scalars case (or Invalid_Value attribute used) else -- For float types, use float values from System.Scalar_Values if Is_Floating_Point_Type (T) then if Root_Type (T) = Standard_Short_Float then Val_RE := RE_IS_Isf; elsif Root_Type (T) = Standard_Float then Val_RE := RE_IS_Ifl; elsif Root_Type (T) = Standard_Long_Float then Val_RE := RE_IS_Ilf; else pragma Assert (Root_Type (T) = Standard_Long_Long_Float); Val_RE := RE_IS_Ill; end if; -- If zero is invalid, use zero values from System.Scalar_Values elsif Lo_Bound /= No_Uint and then Lo_Bound > Uint_0 then if Size_To_Use <= 8 then Val_RE := RE_IS_Iz1; elsif Size_To_Use <= 16 then Val_RE := RE_IS_Iz2; elsif Size_To_Use <= 32 then Val_RE := RE_IS_Iz4; else Val_RE := RE_IS_Iz8; end if; -- For unsigned, use unsigned values from System.Scalar_Values elsif Is_Unsigned_Type (T) then if Size_To_Use <= 8 then Val_RE := RE_IS_Iu1; elsif Size_To_Use <= 16 then Val_RE := RE_IS_Iu2; elsif Size_To_Use <= 32 then Val_RE := RE_IS_Iu4; else Val_RE := RE_IS_Iu8; end if; -- For signed, use signed values from System.Scalar_Values else if Size_To_Use <= 8 then Val_RE := RE_IS_Is1; elsif Size_To_Use <= 16 then Val_RE := RE_IS_Is2; elsif Size_To_Use <= 32 then Val_RE := RE_IS_Is4; else Val_RE := RE_IS_Is8; end if; end if; Val := New_Occurrence_Of (RTE (Val_RE), Loc); end if; -- The final expression is obtained by doing an unchecked conversion -- of this result to the base type of the required subtype. Use the -- base type to prevent the unchecked conversion from chopping bits, -- and then we set Kill_Range_Check to preserve the "bad" value. Result := Unchecked_Convert_To (Base_Type (T), Val); -- Ensure result is not truncated, since we want the "bad" bits, and -- also kill range check on result. if Nkind (Result) = N_Unchecked_Type_Conversion then Set_No_Truncation (Result); Set_Kill_Range_Check (Result, True); end if; return Result; -- String or Wide_[Wide]_String (must have Initialize_Scalars set) elsif Is_Standard_String_Type (T) then pragma Assert (Init_Or_Norm_Scalars); return Make_Aggregate (Loc, Component_Associations => New_List ( Make_Component_Association (Loc, Choices => New_List ( Make_Others_Choice (Loc)), Expression => Get_Simple_Init_Val (Component_Type (T), N, Esize (Root_Type (T)))))); -- Access type is initialized to null elsif Is_Access_Type (T) then return Make_Null (Loc); -- No other possibilities should arise, since we should only be calling -- Get_Simple_Init_Val if Needs_Simple_Initialization returned True, -- indicating one of the above cases held. else raise Program_Error; end if; exception when RE_Not_Available => return Empty; end Get_Simple_Init_Val; ------------------------------ -- Has_New_Non_Standard_Rep -- ------------------------------ function Has_New_Non_Standard_Rep (T : Entity_Id) return Boolean is begin if not Is_Derived_Type (T) then return Has_Non_Standard_Rep (T) or else Has_Non_Standard_Rep (Root_Type (T)); -- If Has_Non_Standard_Rep is not set on the derived type, the -- representation is fully inherited. elsif not Has_Non_Standard_Rep (T) then return False; else return First_Rep_Item (T) /= First_Rep_Item (Root_Type (T)); -- May need a more precise check here: the First_Rep_Item may be a -- stream attribute, which does not affect the representation of the -- type ??? end if; end Has_New_Non_Standard_Rep; ---------------------- -- Inline_Init_Proc -- ---------------------- function Inline_Init_Proc (Typ : Entity_Id) return Boolean is begin -- The initialization proc of protected records is not worth inlining. -- In addition, when compiled for another unit for inlining purposes, -- it may make reference to entities that have not been elaborated yet. -- The initialization proc of records that need finalization contains -- a nested clean-up procedure that makes it impractical to inline as -- well, except for simple controlled types themselves. And similar -- considerations apply to task types. if Is_Concurrent_Type (Typ) then return False; elsif Needs_Finalization (Typ) and then not Is_Controlled (Typ) then return False; elsif Has_Task (Typ) then return False; else return True; end if; end Inline_Init_Proc; ---------------- -- In_Runtime -- ---------------- function In_Runtime (E : Entity_Id) return Boolean is S1 : Entity_Id; begin S1 := Scope (E); while Scope (S1) /= Standard_Standard loop S1 := Scope (S1); end loop; return Is_RTU (S1, System) or else Is_RTU (S1, Ada); end In_Runtime; ---------------------------- -- Initialization_Warning -- ---------------------------- procedure Initialization_Warning (E : Entity_Id) is Warning_Needed : Boolean; begin Warning_Needed := False; if Ekind (Current_Scope) = E_Package and then Static_Elaboration_Desired (Current_Scope) then if Is_Type (E) then if Is_Record_Type (E) then if Has_Discriminants (E) or else Is_Limited_Type (E) or else Has_Non_Standard_Rep (E) then Warning_Needed := True; else -- Verify that at least one component has an initialization -- expression. No need for a warning on a type if all its -- components have no initialization. declare Comp : Entity_Id; begin Comp := First_Component (E); while Present (Comp) loop if Ekind (Comp) = E_Discriminant or else (Nkind (Parent (Comp)) = N_Component_Declaration and then Present (Expression (Parent (Comp)))) then Warning_Needed := True; exit; end if; Next_Component (Comp); end loop; end; end if; if Warning_Needed then Error_Msg_N ("Objects of the type cannot be initialized statically " & "by default??", Parent (E)); end if; end if; else Error_Msg_N ("Object cannot be initialized statically??", E); end if; end if; end Initialization_Warning; ------------------ -- Init_Formals -- ------------------ function Init_Formals (Typ : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Typ); Formals : List_Id; begin -- First parameter is always _Init : in out typ. Note that we need this -- to be in/out because in the case of the task record value, there -- are default record fields (_Priority, _Size, -Task_Info) that may -- be referenced in the generated initialization routine. Formals := New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uInit), In_Present => True, Out_Present => True, Parameter_Type => New_Occurrence_Of (Typ, Loc))); -- For task record value, or type that contains tasks, add two more -- formals, _Master : Master_Id and _Chain : in out Activation_Chain -- We also add these parameters for the task record type case. if Has_Task (Typ) or else (Is_Record_Type (Typ) and then Is_Task_Record_Type (Typ)) then Append_To (Formals, Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uMaster), Parameter_Type => New_Occurrence_Of (RTE (RE_Master_Id), Loc))); -- Add _Chain (not done for sequential elaboration policy, see -- comment for Create_Restricted_Task_Sequential in s-tarest.ads). if Partition_Elaboration_Policy /= 'S' then Append_To (Formals, Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uChain), In_Present => True, Out_Present => True, Parameter_Type => New_Occurrence_Of (RTE (RE_Activation_Chain), Loc))); end if; Append_To (Formals, Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_uTask_Name), In_Present => True, Parameter_Type => New_Occurrence_Of (Standard_String, Loc))); end if; return Formals; exception when RE_Not_Available => return Empty_List; end Init_Formals; ------------------------- -- Init_Secondary_Tags -- ------------------------- procedure Init_Secondary_Tags (Typ : Entity_Id; Target : Node_Id; Stmts_List : List_Id; Fixed_Comps : Boolean := True; Variable_Comps : Boolean := True) is Loc : constant Source_Ptr := Sloc (Target); -- Inherit the C++ tag of the secondary dispatch table of Typ associated -- with Iface. Tag_Comp is the component of Typ that stores Iface_Tag. procedure Initialize_Tag (Typ : Entity_Id; Iface : Entity_Id; Tag_Comp : Entity_Id; Iface_Tag : Node_Id); -- Initialize the tag of the secondary dispatch table of Typ associated -- with Iface. Tag_Comp is the component of Typ that stores Iface_Tag. -- Compiling under the CPP full ABI compatibility mode, if the ancestor -- of Typ CPP tagged type we generate code to inherit the contents of -- the dispatch table directly from the ancestor. -------------------- -- Initialize_Tag -- -------------------- procedure Initialize_Tag (Typ : Entity_Id; Iface : Entity_Id; Tag_Comp : Entity_Id; Iface_Tag : Node_Id) is Comp_Typ : Entity_Id; Offset_To_Top_Comp : Entity_Id := Empty; begin -- Initialize pointer to secondary DT associated with the interface if not Is_Ancestor (Iface, Typ, Use_Full_View => True) then Append_To (Stmts_List, Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)), Expression => New_Occurrence_Of (Iface_Tag, Loc))); end if; Comp_Typ := Scope (Tag_Comp); -- Initialize the entries of the table of interfaces. We generate a -- different call when the parent of the type has variable size -- components. if Comp_Typ /= Etype (Comp_Typ) and then Is_Variable_Size_Record (Etype (Comp_Typ)) and then Chars (Tag_Comp) /= Name_uTag then pragma Assert (Present (DT_Offset_To_Top_Func (Tag_Comp))); -- Issue error if Set_Dynamic_Offset_To_Top is not available in a -- configurable run-time environment. if not RTE_Available (RE_Set_Dynamic_Offset_To_Top) then Error_Msg_CRT ("variable size record with interface types", Typ); return; end if; -- Generate: -- Set_Dynamic_Offset_To_Top -- (This => Init, -- Interface_T => Iface'Tag, -- Offset_Value => n, -- Offset_Func => Fn'Address) Append_To (Stmts_List, Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Set_Dynamic_Offset_To_Top), Loc), Parameter_Associations => New_List ( Make_Attribute_Reference (Loc, Prefix => New_Copy_Tree (Target), Attribute_Name => Name_Address), Unchecked_Convert_To (RTE (RE_Tag), New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Iface))), Loc)), Unchecked_Convert_To (RTE (RE_Storage_Offset), Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)), Attribute_Name => Name_Position)), Unchecked_Convert_To (RTE (RE_Offset_To_Top_Function_Ptr), Make_Attribute_Reference (Loc, Prefix => New_Occurrence_Of (DT_Offset_To_Top_Func (Tag_Comp), Loc), Attribute_Name => Name_Address))))); -- In this case the next component stores the value of the offset -- to the top. Offset_To_Top_Comp := Next_Entity (Tag_Comp); pragma Assert (Present (Offset_To_Top_Comp)); Append_To (Stmts_List, Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Offset_To_Top_Comp, Loc)), Expression => Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)), Attribute_Name => Name_Position))); -- Normal case: No discriminants in the parent type else -- Don't need to set any value if this interface shares the -- primary dispatch table. if not Is_Ancestor (Iface, Typ, Use_Full_View => True) then Append_To (Stmts_List, Build_Set_Static_Offset_To_Top (Loc, Iface_Tag => New_Occurrence_Of (Iface_Tag, Loc), Offset_Value => Unchecked_Convert_To (RTE (RE_Storage_Offset), Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)), Attribute_Name => Name_Position)))); end if; -- Generate: -- Register_Interface_Offset -- (This => Init, -- Interface_T => Iface'Tag, -- Is_Constant => True, -- Offset_Value => n, -- Offset_Func => null); if RTE_Available (RE_Register_Interface_Offset) then Append_To (Stmts_List, Make_Procedure_Call_Statement (Loc, Name => New_Occurrence_Of (RTE (RE_Register_Interface_Offset), Loc), Parameter_Associations => New_List ( Make_Attribute_Reference (Loc, Prefix => New_Copy_Tree (Target), Attribute_Name => Name_Address), Unchecked_Convert_To (RTE (RE_Tag), New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Iface))), Loc)), New_Occurrence_Of (Standard_True, Loc), Unchecked_Convert_To (RTE (RE_Storage_Offset), Make_Attribute_Reference (Loc, Prefix => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Tag_Comp, Loc)), Attribute_Name => Name_Position)), Make_Null (Loc)))); end if; end if; end Initialize_Tag; -- Local variables Full_Typ : Entity_Id; Ifaces_List : Elist_Id; Ifaces_Comp_List : Elist_Id; Ifaces_Tag_List : Elist_Id; Iface_Elmt : Elmt_Id; Iface_Comp_Elmt : Elmt_Id; Iface_Tag_Elmt : Elmt_Id; Tag_Comp : Node_Id; In_Variable_Pos : Boolean; -- Start of processing for Init_Secondary_Tags begin -- Handle private types if Present (Full_View (Typ)) then Full_Typ := Full_View (Typ); else Full_Typ := Typ; end if; Collect_Interfaces_Info (Full_Typ, Ifaces_List, Ifaces_Comp_List, Ifaces_Tag_List); Iface_Elmt := First_Elmt (Ifaces_List); Iface_Comp_Elmt := First_Elmt (Ifaces_Comp_List); Iface_Tag_Elmt := First_Elmt (Ifaces_Tag_List); while Present (Iface_Elmt) loop Tag_Comp := Node (Iface_Comp_Elmt); -- Check if parent of record type has variable size components In_Variable_Pos := Scope (Tag_Comp) /= Etype (Scope (Tag_Comp)) and then Is_Variable_Size_Record (Etype (Scope (Tag_Comp))); -- If we are compiling under the CPP full ABI compatibility mode and -- the ancestor is a CPP_Pragma tagged type then we generate code to -- initialize the secondary tag components from tags that reference -- secondary tables filled with copy of parent slots. if Is_CPP_Class (Root_Type (Full_Typ)) then -- Reject interface components located at variable offset in -- C++ derivations. This is currently unsupported. if not Fixed_Comps and then In_Variable_Pos then -- Locate the first dynamic component of the record. Done to -- improve the text of the warning. declare Comp : Entity_Id; Comp_Typ : Entity_Id; begin Comp := First_Entity (Typ); while Present (Comp) loop Comp_Typ := Etype (Comp); if Ekind (Comp) /= E_Discriminant and then not Is_Tag (Comp) then exit when (Is_Record_Type (Comp_Typ) and then Is_Variable_Size_Record (Base_Type (Comp_Typ))) or else (Is_Array_Type (Comp_Typ) and then Is_Variable_Size_Array (Comp_Typ)); end if; Next_Entity (Comp); end loop; pragma Assert (Present (Comp)); Error_Msg_Node_2 := Comp; Error_Msg_NE ("parent type & with dynamic component & cannot be parent" & " of 'C'P'P derivation if new interfaces are present", Typ, Scope (Original_Record_Component (Comp))); Error_Msg_Sloc := Sloc (Scope (Original_Record_Component (Comp))); Error_Msg_NE ("type derived from 'C'P'P type & defined #", Typ, Scope (Original_Record_Component (Comp))); -- Avoid duplicated warnings exit; end; -- Initialize secondary tags else Append_To (Stmts_List, Make_Assignment_Statement (Loc, Name => Make_Selected_Component (Loc, Prefix => New_Copy_Tree (Target), Selector_Name => New_Occurrence_Of (Node (Iface_Comp_Elmt), Loc)), Expression => New_Occurrence_Of (Node (Iface_Tag_Elmt), Loc))); end if; -- Otherwise generate code to initialize the tag else if (In_Variable_Pos and then Variable_Comps) or else (not In_Variable_Pos and then Fixed_Comps) then Initialize_Tag (Full_Typ, Iface => Node (Iface_Elmt), Tag_Comp => Tag_Comp, Iface_Tag => Node (Iface_Tag_Elmt)); end if; end if; Next_Elmt (Iface_Elmt); Next_Elmt (Iface_Comp_Elmt); Next_Elmt (Iface_Tag_Elmt); end loop; end Init_Secondary_Tags; ------------------------ -- Is_User_Defined_Eq -- ------------------------ function Is_User_Defined_Equality (Prim : Node_Id) return Boolean is begin return Chars (Prim) = Name_Op_Eq and then Etype (First_Formal (Prim)) = Etype (Next_Formal (First_Formal (Prim))) and then Base_Type (Etype (Prim)) = Standard_Boolean; end Is_User_Defined_Equality; ---------------------------------------- -- Make_Controlling_Function_Wrappers -- ---------------------------------------- procedure Make_Controlling_Function_Wrappers (Tag_Typ : Entity_Id; Decl_List : out List_Id; Body_List : out List_Id) is Loc : constant Source_Ptr := Sloc (Tag_Typ); Prim_Elmt : Elmt_Id; Subp : Entity_Id; Actual_List : List_Id; Formal_List : List_Id; Formal : Entity_Id; Par_Formal : Entity_Id; Formal_Node : Node_Id; Func_Body : Node_Id; Func_Decl : Node_Id; Func_Spec : Node_Id; Return_Stmt : Node_Id; begin Decl_List := New_List; Body_List := New_List; Prim_Elmt := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim_Elmt) loop Subp := Node (Prim_Elmt); -- If a primitive function with a controlling result of the type has -- not been overridden by the user, then we must create a wrapper -- function here that effectively overrides it and invokes the -- (non-abstract) parent function. This can only occur for a null -- extension. Note that functions with anonymous controlling access -- results don't qualify and must be overridden. We also exclude -- Input attributes, since each type will have its own version of -- Input constructed by the expander. The test for Comes_From_Source -- is needed to distinguish inherited operations from renamings -- (which also have Alias set). We exclude internal entities with -- Interface_Alias to avoid generating duplicated wrappers since -- the primitive which covers the interface is also available in -- the list of primitive operations. -- The function may be abstract, or require_Overriding may be set -- for it, because tests for null extensions may already have reset -- the Is_Abstract_Subprogram_Flag. If Requires_Overriding is not -- set, functions that need wrappers are recognized by having an -- alias that returns the parent type. if Comes_From_Source (Subp) or else No (Alias (Subp)) or else Present (Interface_Alias (Subp)) or else Ekind (Subp) /= E_Function or else not Has_Controlling_Result (Subp) or else Is_Access_Type (Etype (Subp)) or else Is_Abstract_Subprogram (Alias (Subp)) or else Is_TSS (Subp, TSS_Stream_Input) then goto Next_Prim; elsif Is_Abstract_Subprogram (Subp) or else Requires_Overriding (Subp) or else (Is_Null_Extension (Etype (Subp)) and then Etype (Alias (Subp)) /= Etype (Subp)) then Formal_List := No_List; Formal := First_Formal (Subp); if Present (Formal) then Formal_List := New_List; while Present (Formal) loop Append (Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Sloc (Formal), Chars => Chars (Formal)), In_Present => In_Present (Parent (Formal)), Out_Present => Out_Present (Parent (Formal)), Null_Exclusion_Present => Null_Exclusion_Present (Parent (Formal)), Parameter_Type => New_Occurrence_Of (Etype (Formal), Loc), Expression => New_Copy_Tree (Expression (Parent (Formal)))), Formal_List); Next_Formal (Formal); end loop; end if; Func_Spec := Make_Function_Specification (Loc, Defining_Unit_Name => Make_Defining_Identifier (Loc, Chars => Chars (Subp)), Parameter_Specifications => Formal_List, Result_Definition => New_Occurrence_Of (Etype (Subp), Loc)); Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec); Append_To (Decl_List, Func_Decl); -- Build a wrapper body that calls the parent function. The body -- contains a single return statement that returns an extension -- aggregate whose ancestor part is a call to the parent function, -- passing the formals as actuals (with any controlling arguments -- converted to the types of the corresponding formals of the -- parent function, which might be anonymous access types), and -- having a null extension. Formal := First_Formal (Subp); Par_Formal := First_Formal (Alias (Subp)); Formal_Node := First (Formal_List); if Present (Formal) then Actual_List := New_List; else Actual_List := No_List; end if; while Present (Formal) loop if Is_Controlling_Formal (Formal) then Append_To (Actual_List, Make_Type_Conversion (Loc, Subtype_Mark => New_Occurrence_Of (Etype (Par_Formal), Loc), Expression => New_Occurrence_Of (Defining_Identifier (Formal_Node), Loc))); else Append_To (Actual_List, New_Occurrence_Of (Defining_Identifier (Formal_Node), Loc)); end if; Next_Formal (Formal); Next_Formal (Par_Formal); Next (Formal_Node); end loop; Return_Stmt := Make_Simple_Return_Statement (Loc, Expression => Make_Extension_Aggregate (Loc, Ancestor_Part => Make_Function_Call (Loc, Name => New_Occurrence_Of (Alias (Subp), Loc), Parameter_Associations => Actual_List), Null_Record_Present => True)); Func_Body := Make_Subprogram_Body (Loc, Specification => New_Copy_Tree (Func_Spec), Declarations => Empty_List, Handled_Statement_Sequence => Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Return_Stmt))); Set_Defining_Unit_Name (Specification (Func_Body), Make_Defining_Identifier (Loc, Chars (Subp))); Append_To (Body_List, Func_Body); -- Replace the inherited function with the wrapper function in the -- primitive operations list. We add the minimum decoration needed -- to override interface primitives. Set_Ekind (Defining_Unit_Name (Func_Spec), E_Function); Override_Dispatching_Operation (Tag_Typ, Subp, New_Op => Defining_Unit_Name (Func_Spec), Is_Wrapper => True); end if; <<Next_Prim>> Next_Elmt (Prim_Elmt); end loop; end Make_Controlling_Function_Wrappers; ------------------- -- Make_Eq_Body -- ------------------- function Make_Eq_Body (Typ : Entity_Id; Eq_Name : Name_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (Parent (Typ)); Decl : Node_Id; Def : constant Node_Id := Parent (Typ); Stmts : constant List_Id := New_List; Variant_Case : Boolean := Has_Discriminants (Typ); Comps : Node_Id := Empty; Typ_Def : Node_Id := Type_Definition (Def); begin Decl := Predef_Spec_Or_Body (Loc, Tag_Typ => Typ, Name => Eq_Name, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Parameter_Type => New_Occurrence_Of (Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y), Parameter_Type => New_Occurrence_Of (Typ, Loc))), Ret_Type => Standard_Boolean, For_Body => True); if Variant_Case then if Nkind (Typ_Def) = N_Derived_Type_Definition then Typ_Def := Record_Extension_Part (Typ_Def); end if; if Present (Typ_Def) then Comps := Component_List (Typ_Def); end if; Variant_Case := Present (Comps) and then Present (Variant_Part (Comps)); end if; if Variant_Case then Append_To (Stmts, Make_Eq_If (Typ, Discriminant_Specifications (Def))); Append_List_To (Stmts, Make_Eq_Case (Typ, Comps)); Append_To (Stmts, Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_True, Loc))); else Append_To (Stmts, Make_Simple_Return_Statement (Loc, Expression => Expand_Record_Equality (Typ, Typ => Typ, Lhs => Make_Identifier (Loc, Name_X), Rhs => Make_Identifier (Loc, Name_Y), Bodies => Declarations (Decl)))); end if; Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, Stmts)); return Decl; end Make_Eq_Body; ------------------ -- Make_Eq_Case -- ------------------ -- <Make_Eq_If shared components> -- case X.D1 is -- when V1 => <Make_Eq_Case> on subcomponents -- ... -- when Vn => <Make_Eq_Case> on subcomponents -- end case; function Make_Eq_Case (E : Entity_Id; CL : Node_Id; Discrs : Elist_Id := New_Elmt_List) return List_Id is Loc : constant Source_Ptr := Sloc (E); Result : constant List_Id := New_List; Variant : Node_Id; Alt_List : List_Id; function Corresponding_Formal (C : Node_Id) return Entity_Id; -- Given the discriminant that controls a given variant of an unchecked -- union, find the formal of the equality function that carries the -- inferred value of the discriminant. function External_Name (E : Entity_Id) return Name_Id; -- The value of a given discriminant is conveyed in the corresponding -- formal parameter of the equality routine. The name of this formal -- parameter carries a one-character suffix which is removed here. -------------------------- -- Corresponding_Formal -- -------------------------- function Corresponding_Formal (C : Node_Id) return Entity_Id is Discr : constant Entity_Id := Entity (Name (Variant_Part (C))); Elm : Elmt_Id; begin Elm := First_Elmt (Discrs); while Present (Elm) loop if Chars (Discr) = External_Name (Node (Elm)) then return Node (Elm); end if; Next_Elmt (Elm); end loop; -- A formal of the proper name must be found raise Program_Error; end Corresponding_Formal; ------------------- -- External_Name -- ------------------- function External_Name (E : Entity_Id) return Name_Id is begin Get_Name_String (Chars (E)); Name_Len := Name_Len - 1; return Name_Find; end External_Name; -- Start of processing for Make_Eq_Case begin Append_To (Result, Make_Eq_If (E, Component_Items (CL))); if No (Variant_Part (CL)) then return Result; end if; Variant := First_Non_Pragma (Variants (Variant_Part (CL))); if No (Variant) then return Result; end if; Alt_List := New_List; while Present (Variant) loop Append_To (Alt_List, Make_Case_Statement_Alternative (Loc, Discrete_Choices => New_Copy_List (Discrete_Choices (Variant)), Statements => Make_Eq_Case (E, Component_List (Variant), Discrs))); Next_Non_Pragma (Variant); end loop; -- If we have an Unchecked_Union, use one of the parameters of the -- enclosing equality routine that captures the discriminant, to use -- as the expression in the generated case statement. if Is_Unchecked_Union (E) then Append_To (Result, Make_Case_Statement (Loc, Expression => New_Occurrence_Of (Corresponding_Formal (CL), Loc), Alternatives => Alt_List)); else Append_To (Result, Make_Case_Statement (Loc, Expression => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_X), Selector_Name => New_Copy (Name (Variant_Part (CL)))), Alternatives => Alt_List)); end if; return Result; end Make_Eq_Case; ---------------- -- Make_Eq_If -- ---------------- -- Generates: -- if -- X.C1 /= Y.C1 -- or else -- X.C2 /= Y.C2 -- ... -- then -- return False; -- end if; -- or a null statement if the list L is empty function Make_Eq_If (E : Entity_Id; L : List_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (E); C : Node_Id; Field_Name : Name_Id; Cond : Node_Id; begin if No (L) then return Make_Null_Statement (Loc); else Cond := Empty; C := First_Non_Pragma (L); while Present (C) loop Field_Name := Chars (Defining_Identifier (C)); -- The tags must not be compared: they are not part of the value. -- Ditto for parent interfaces because their equality operator is -- abstract. -- Note also that in the following, we use Make_Identifier for -- the component names. Use of New_Occurrence_Of to identify the -- components would be incorrect because the wrong entities for -- discriminants could be picked up in the private type case. if Field_Name = Name_uParent and then Is_Interface (Etype (Defining_Identifier (C))) then null; elsif Field_Name /= Name_uTag then Evolve_Or_Else (Cond, Make_Op_Ne (Loc, Left_Opnd => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_X), Selector_Name => Make_Identifier (Loc, Field_Name)), Right_Opnd => Make_Selected_Component (Loc, Prefix => Make_Identifier (Loc, Name_Y), Selector_Name => Make_Identifier (Loc, Field_Name)))); end if; Next_Non_Pragma (C); end loop; if No (Cond) then return Make_Null_Statement (Loc); else return Make_Implicit_If_Statement (E, Condition => Cond, Then_Statements => New_List ( Make_Simple_Return_Statement (Loc, Expression => New_Occurrence_Of (Standard_False, Loc)))); end if; end if; end Make_Eq_If; ------------------- -- Make_Neq_Body -- ------------------- function Make_Neq_Body (Tag_Typ : Entity_Id) return Node_Id is function Is_Predefined_Neq_Renaming (Prim : Node_Id) return Boolean; -- Returns true if Prim is a renaming of an unresolved predefined -- inequality operation. -------------------------------- -- Is_Predefined_Neq_Renaming -- -------------------------------- function Is_Predefined_Neq_Renaming (Prim : Node_Id) return Boolean is begin return Chars (Prim) /= Name_Op_Ne and then Present (Alias (Prim)) and then Comes_From_Source (Prim) and then Is_Intrinsic_Subprogram (Alias (Prim)) and then Chars (Alias (Prim)) = Name_Op_Ne; end Is_Predefined_Neq_Renaming; -- Local variables Loc : constant Source_Ptr := Sloc (Parent (Tag_Typ)); Stmts : constant List_Id := New_List; Decl : Node_Id; Eq_Prim : Entity_Id; Left_Op : Entity_Id; Renaming_Prim : Entity_Id; Right_Op : Entity_Id; Target : Entity_Id; -- Start of processing for Make_Neq_Body begin -- For a call on a renaming of a dispatching subprogram that is -- overridden, if the overriding occurred before the renaming, then -- the body executed is that of the overriding declaration, even if the -- overriding declaration is not visible at the place of the renaming; -- otherwise, the inherited or predefined subprogram is called, see -- (RM 8.5.4(8)) -- Stage 1: Search for a renaming of the inequality primitive and also -- search for an overriding of the equality primitive located before the -- renaming declaration. declare Elmt : Elmt_Id; Prim : Node_Id; begin Eq_Prim := Empty; Renaming_Prim := Empty; Elmt := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Elmt) loop Prim := Node (Elmt); if Is_User_Defined_Equality (Prim) and then No (Alias (Prim)) then if No (Renaming_Prim) then pragma Assert (No (Eq_Prim)); Eq_Prim := Prim; end if; elsif Is_Predefined_Neq_Renaming (Prim) then Renaming_Prim := Prim; end if; Next_Elmt (Elmt); end loop; end; -- No further action needed if no renaming was found if No (Renaming_Prim) then return Empty; end if; -- Stage 2: Replace the renaming declaration by a subprogram declaration -- (required to add its body) Decl := Parent (Parent (Renaming_Prim)); Rewrite (Decl, Make_Subprogram_Declaration (Loc, Specification => Specification (Decl))); Set_Analyzed (Decl); -- Remove the decoration of intrinsic renaming subprogram Set_Is_Intrinsic_Subprogram (Renaming_Prim, False); Set_Convention (Renaming_Prim, Convention_Ada); Set_Alias (Renaming_Prim, Empty); Set_Has_Completion (Renaming_Prim, False); -- Stage 3: Build the corresponding body Left_Op := First_Formal (Renaming_Prim); Right_Op := Next_Formal (Left_Op); Decl := Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Chars (Renaming_Prim), Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Chars (Left_Op)), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Chars (Right_Op)), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))), Ret_Type => Standard_Boolean, For_Body => True); -- If the overriding of the equality primitive occurred before the -- renaming, then generate: -- function <Neq_Name> (X : Y : Typ) return Boolean is -- begin -- return not Oeq (X, Y); -- end; if Present (Eq_Prim) then Target := Eq_Prim; -- Otherwise build a nested subprogram which performs the predefined -- evaluation of the equality operator. That is, generate: -- function <Neq_Name> (X : Y : Typ) return Boolean is -- function Oeq (X : Y) return Boolean is -- begin -- <<body of default implementation>> -- end; -- begin -- return not Oeq (X, Y); -- end; else declare Local_Subp : Node_Id; begin Local_Subp := Make_Eq_Body (Tag_Typ, Name_Op_Eq); Set_Declarations (Decl, New_List (Local_Subp)); Target := Defining_Entity (Local_Subp); end; end if; Append_To (Stmts, Make_Simple_Return_Statement (Loc, Expression => Make_Op_Not (Loc, Make_Function_Call (Loc, Name => New_Occurrence_Of (Target, Loc), Parameter_Associations => New_List ( Make_Identifier (Loc, Chars (Left_Op)), Make_Identifier (Loc, Chars (Right_Op))))))); Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, Stmts)); return Decl; end Make_Neq_Body; ------------------------------- -- Make_Null_Procedure_Specs -- ------------------------------- function Make_Null_Procedure_Specs (Tag_Typ : Entity_Id) return List_Id is Decl_List : constant List_Id := New_List; Loc : constant Source_Ptr := Sloc (Tag_Typ); Formal : Entity_Id; Formal_List : List_Id; New_Param_Spec : Node_Id; Parent_Subp : Entity_Id; Prim_Elmt : Elmt_Id; Subp : Entity_Id; begin Prim_Elmt := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim_Elmt) loop Subp := Node (Prim_Elmt); -- If a null procedure inherited from an interface has not been -- overridden, then we build a null procedure declaration to -- override the inherited procedure. Parent_Subp := Alias (Subp); if Present (Parent_Subp) and then Is_Null_Interface_Primitive (Parent_Subp) then Formal_List := No_List; Formal := First_Formal (Subp); if Present (Formal) then Formal_List := New_List; while Present (Formal) loop -- Copy the parameter spec including default expressions New_Param_Spec := New_Copy_Tree (Parent (Formal), New_Sloc => Loc); -- Generate a new defining identifier for the new formal. -- required because New_Copy_Tree does not duplicate -- semantic fields (except itypes). Set_Defining_Identifier (New_Param_Spec, Make_Defining_Identifier (Sloc (Formal), Chars => Chars (Formal))); -- For controlling arguments we must change their -- parameter type to reference the tagged type (instead -- of the interface type) if Is_Controlling_Formal (Formal) then if Nkind (Parameter_Type (Parent (Formal))) = N_Identifier then Set_Parameter_Type (New_Param_Spec, New_Occurrence_Of (Tag_Typ, Loc)); else pragma Assert (Nkind (Parameter_Type (Parent (Formal))) = N_Access_Definition); Set_Subtype_Mark (Parameter_Type (New_Param_Spec), New_Occurrence_Of (Tag_Typ, Loc)); end if; end if; Append (New_Param_Spec, Formal_List); Next_Formal (Formal); end loop; end if; Append_To (Decl_List, Make_Subprogram_Declaration (Loc, Make_Procedure_Specification (Loc, Defining_Unit_Name => Make_Defining_Identifier (Loc, Chars (Subp)), Parameter_Specifications => Formal_List, Null_Present => True))); end if; Next_Elmt (Prim_Elmt); end loop; return Decl_List; end Make_Null_Procedure_Specs; ------------------------------------- -- Make_Predefined_Primitive_Specs -- ------------------------------------- procedure Make_Predefined_Primitive_Specs (Tag_Typ : Entity_Id; Predef_List : out List_Id; Renamed_Eq : out Entity_Id) is function Is_Predefined_Eq_Renaming (Prim : Node_Id) return Boolean; -- Returns true if Prim is a renaming of an unresolved predefined -- equality operation. ------------------------------- -- Is_Predefined_Eq_Renaming -- ------------------------------- function Is_Predefined_Eq_Renaming (Prim : Node_Id) return Boolean is begin return Chars (Prim) /= Name_Op_Eq and then Present (Alias (Prim)) and then Comes_From_Source (Prim) and then Is_Intrinsic_Subprogram (Alias (Prim)) and then Chars (Alias (Prim)) = Name_Op_Eq; end Is_Predefined_Eq_Renaming; -- Local variables Loc : constant Source_Ptr := Sloc (Tag_Typ); Res : constant List_Id := New_List; Eq_Name : Name_Id := Name_Op_Eq; Eq_Needed : Boolean; Eq_Spec : Node_Id; Prim : Elmt_Id; Has_Predef_Eq_Renaming : Boolean := False; -- Set to True if Tag_Typ has a primitive that renames the predefined -- equality operator. Used to implement (RM 8-5-4(8)). -- Start of processing for Make_Predefined_Primitive_Specs begin Renamed_Eq := Empty; -- Spec of _Size Append_To (Res, Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Name_uSize, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))), Ret_Type => Standard_Long_Long_Integer)); -- Specs for dispatching stream attributes declare Stream_Op_TSS_Names : constant array (Integer range <>) of TSS_Name_Type := (TSS_Stream_Read, TSS_Stream_Write, TSS_Stream_Input, TSS_Stream_Output); begin for Op in Stream_Op_TSS_Names'Range loop if Stream_Operation_OK (Tag_Typ, Stream_Op_TSS_Names (Op)) then Append_To (Res, Predef_Stream_Attr_Spec (Loc, Tag_Typ, Stream_Op_TSS_Names (Op))); end if; end loop; end; -- Spec of "=" is expanded if the type is not limited and if a user -- defined "=" was not already declared for the non-full view of a -- private extension if not Is_Limited_Type (Tag_Typ) then Eq_Needed := True; Prim := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim) loop -- If a primitive is encountered that renames the predefined -- equality operator before reaching any explicit equality -- primitive, then we still need to create a predefined equality -- function, because calls to it can occur via the renaming. A -- new name is created for the equality to avoid conflicting with -- any user-defined equality. (Note that this doesn't account for -- renamings of equality nested within subpackages???) if Is_Predefined_Eq_Renaming (Node (Prim)) then Has_Predef_Eq_Renaming := True; Eq_Name := New_External_Name (Chars (Node (Prim)), 'E'); -- User-defined equality elsif Is_User_Defined_Equality (Node (Prim)) then if No (Alias (Node (Prim))) or else Nkind (Unit_Declaration_Node (Node (Prim))) = N_Subprogram_Renaming_Declaration then Eq_Needed := False; exit; -- If the parent is not an interface type and has an abstract -- equality function explicitly defined in the sources, then -- the inherited equality is abstract as well, and no body can -- be created for it. elsif not Is_Interface (Etype (Tag_Typ)) and then Present (Alias (Node (Prim))) and then Comes_From_Source (Alias (Node (Prim))) and then Is_Abstract_Subprogram (Alias (Node (Prim))) then Eq_Needed := False; exit; -- If the type has an equality function corresponding with -- a primitive defined in an interface type, the inherited -- equality is abstract as well, and no body can be created -- for it. elsif Present (Alias (Node (Prim))) and then Comes_From_Source (Ultimate_Alias (Node (Prim))) and then Is_Interface (Find_Dispatching_Type (Ultimate_Alias (Node (Prim)))) then Eq_Needed := False; exit; end if; end if; Next_Elmt (Prim); end loop; -- If a renaming of predefined equality was found but there was no -- user-defined equality (so Eq_Needed is still true), then set the -- name back to Name_Op_Eq. But in the case where a user-defined -- equality was located after such a renaming, then the predefined -- equality function is still needed, so Eq_Needed must be set back -- to True. if Eq_Name /= Name_Op_Eq then if Eq_Needed then Eq_Name := Name_Op_Eq; else Eq_Needed := True; end if; end if; if Eq_Needed then Eq_Spec := Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Eq_Name, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))), Ret_Type => Standard_Boolean); Append_To (Res, Eq_Spec); if Has_Predef_Eq_Renaming then Renamed_Eq := Defining_Unit_Name (Specification (Eq_Spec)); Prim := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim) loop -- Any renamings of equality that appeared before an -- overriding equality must be updated to refer to the -- entity for the predefined equality, otherwise calls via -- the renaming would get incorrectly resolved to call the -- user-defined equality function. if Is_Predefined_Eq_Renaming (Node (Prim)) then Set_Alias (Node (Prim), Renamed_Eq); -- Exit upon encountering a user-defined equality elsif Chars (Node (Prim)) = Name_Op_Eq and then No (Alias (Node (Prim))) then exit; end if; Next_Elmt (Prim); end loop; end if; end if; -- Spec for dispatching assignment Append_To (Res, Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Name_uAssign, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Out_Present => True, Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))))); end if; -- Ada 2005: Generate declarations for the following primitive -- operations for limited interfaces and synchronized types that -- implement a limited interface. -- Disp_Asynchronous_Select -- Disp_Conditional_Select -- Disp_Get_Prim_Op_Kind -- Disp_Get_Task_Id -- Disp_Requeue -- Disp_Timed_Select -- Disable the generation of these bodies if No_Dispatching_Calls, -- Ravenscar or ZFP is active. if Ada_Version >= Ada_2005 and then not Restriction_Active (No_Dispatching_Calls) and then not Restriction_Active (No_Select_Statements) and then RTE_Available (RE_Select_Specific_Data) then -- These primitives are defined abstract in interface types if Is_Interface (Tag_Typ) and then Is_Limited_Record (Tag_Typ) then Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Asynchronous_Select_Spec (Tag_Typ))); Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Conditional_Select_Spec (Tag_Typ))); Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Get_Prim_Op_Kind_Spec (Tag_Typ))); Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Get_Task_Id_Spec (Tag_Typ))); Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Requeue_Spec (Tag_Typ))); Append_To (Res, Make_Abstract_Subprogram_Declaration (Loc, Specification => Make_Disp_Timed_Select_Spec (Tag_Typ))); -- If ancestor is an interface type, declare non-abstract primitives -- to override the abstract primitives of the interface type. -- In VM targets we define these primitives in all root tagged types -- that are not interface types. Done because in VM targets we don't -- have secondary dispatch tables and any derivation of Tag_Typ may -- cover limited interfaces (which always have these primitives since -- they may be ancestors of synchronized interface types). elsif (not Is_Interface (Tag_Typ) and then Is_Interface (Etype (Tag_Typ)) and then Is_Limited_Record (Etype (Tag_Typ))) or else (Is_Concurrent_Record_Type (Tag_Typ) and then Has_Interfaces (Tag_Typ)) or else (not Tagged_Type_Expansion and then not Is_Interface (Tag_Typ) and then Tag_Typ = Root_Type (Tag_Typ)) then Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Asynchronous_Select_Spec (Tag_Typ))); Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Conditional_Select_Spec (Tag_Typ))); Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Get_Prim_Op_Kind_Spec (Tag_Typ))); Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Get_Task_Id_Spec (Tag_Typ))); Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Requeue_Spec (Tag_Typ))); Append_To (Res, Make_Subprogram_Declaration (Loc, Specification => Make_Disp_Timed_Select_Spec (Tag_Typ))); end if; end if; -- All tagged types receive their own Deep_Adjust and Deep_Finalize -- regardless of whether they are controlled or may contain controlled -- components. -- Do not generate the routines if finalization is disabled if Restriction_Active (No_Finalization) then null; else if not Is_Limited_Type (Tag_Typ) then Append_To (Res, Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust)); end if; Append_To (Res, Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Finalize)); end if; Predef_List := Res; end Make_Predefined_Primitive_Specs; ------------------------- -- Make_Tag_Assignment -- ------------------------- function Make_Tag_Assignment (N : Node_Id) return Node_Id is Loc : constant Source_Ptr := Sloc (N); Def_If : constant Entity_Id := Defining_Identifier (N); Expr : constant Node_Id := Expression (N); Typ : constant Entity_Id := Etype (Def_If); Full_Typ : constant Entity_Id := Underlying_Type (Typ); New_Ref : Node_Id; begin -- This expansion activity is called during analysis, but cannot -- be applied in ASIS mode when other expansion is disabled. if Is_Tagged_Type (Typ) and then not Is_Class_Wide_Type (Typ) and then not Is_CPP_Class (Typ) and then Tagged_Type_Expansion and then Nkind (Expr) /= N_Aggregate and then not ASIS_Mode and then (Nkind (Expr) /= N_Qualified_Expression or else Nkind (Expression (Expr)) /= N_Aggregate) then New_Ref := Make_Selected_Component (Loc, Prefix => New_Occurrence_Of (Def_If, Loc), Selector_Name => New_Occurrence_Of (First_Tag_Component (Full_Typ), Loc)); Set_Assignment_OK (New_Ref); return Make_Assignment_Statement (Loc, Name => New_Ref, Expression => Unchecked_Convert_To (RTE (RE_Tag), New_Occurrence_Of (Node (First_Elmt (Access_Disp_Table (Full_Typ))), Loc))); else return Empty; end if; end Make_Tag_Assignment; --------------------------------- -- Needs_Simple_Initialization -- --------------------------------- function Needs_Simple_Initialization (T : Entity_Id; Consider_IS : Boolean := True) return Boolean is Consider_IS_NS : constant Boolean := Normalize_Scalars or (Initialize_Scalars and Consider_IS); begin -- Never need initialization if it is suppressed if Initialization_Suppressed (T) then return False; end if; -- Check for private type, in which case test applies to the underlying -- type of the private type. if Is_Private_Type (T) then declare RT : constant Entity_Id := Underlying_Type (T); begin if Present (RT) then return Needs_Simple_Initialization (RT); else return False; end if; end; -- Scalar type with Default_Value aspect requires initialization elsif Is_Scalar_Type (T) and then Has_Default_Aspect (T) then return True; -- Cases needing simple initialization are access types, and, if pragma -- Normalize_Scalars or Initialize_Scalars is in effect, then all scalar -- types. elsif Is_Access_Type (T) or else (Consider_IS_NS and then (Is_Scalar_Type (T))) then return True; -- If Initialize/Normalize_Scalars is in effect, string objects also -- need initialization, unless they are created in the course of -- expanding an aggregate (since in the latter case they will be -- filled with appropriate initializing values before they are used). elsif Consider_IS_NS and then Is_Standard_String_Type (T) and then (not Is_Itype (T) or else Nkind (Associated_Node_For_Itype (T)) /= N_Aggregate) then return True; else return False; end if; end Needs_Simple_Initialization; ---------------------- -- Predef_Deep_Spec -- ---------------------- function Predef_Deep_Spec (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : TSS_Name_Type; For_Body : Boolean := False) return Node_Id is Formals : List_Id; begin -- V : in out Tag_Typ Formals := New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_V), In_Present => True, Out_Present => True, Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))); -- F : Boolean := True if Name = TSS_Deep_Adjust or else Name = TSS_Deep_Finalize then Append_To (Formals, Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_F), Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc), Expression => New_Occurrence_Of (Standard_True, Loc))); end if; return Predef_Spec_Or_Body (Loc, Name => Make_TSS_Name (Tag_Typ, Name), Tag_Typ => Tag_Typ, Profile => Formals, For_Body => For_Body); exception when RE_Not_Available => return Empty; end Predef_Deep_Spec; ------------------------- -- Predef_Spec_Or_Body -- ------------------------- function Predef_Spec_Or_Body (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : Name_Id; Profile : List_Id; Ret_Type : Entity_Id := Empty; For_Body : Boolean := False) return Node_Id is Id : constant Entity_Id := Make_Defining_Identifier (Loc, Name); Spec : Node_Id; begin Set_Is_Public (Id, Is_Public (Tag_Typ)); -- The internal flag is set to mark these declarations because they have -- specific properties. First, they are primitives even if they are not -- defined in the type scope (the freezing point is not necessarily in -- the same scope). Second, the predefined equality can be overridden by -- a user-defined equality, no body will be generated in this case. Set_Is_Internal (Id); if not Debug_Generated_Code then Set_Debug_Info_Off (Id); end if; if No (Ret_Type) then Spec := Make_Procedure_Specification (Loc, Defining_Unit_Name => Id, Parameter_Specifications => Profile); else Spec := Make_Function_Specification (Loc, Defining_Unit_Name => Id, Parameter_Specifications => Profile, Result_Definition => New_Occurrence_Of (Ret_Type, Loc)); end if; if Is_Interface (Tag_Typ) then return Make_Abstract_Subprogram_Declaration (Loc, Spec); -- If body case, return empty subprogram body. Note that this is ill- -- formed, because there is not even a null statement, and certainly not -- a return in the function case. The caller is expected to do surgery -- on the body to add the appropriate stuff. elsif For_Body then return Make_Subprogram_Body (Loc, Spec, Empty_List, Empty); -- For the case of an Input attribute predefined for an abstract type, -- generate an abstract specification. This will never be called, but we -- need the slot allocated in the dispatching table so that attributes -- typ'Class'Input and typ'Class'Output will work properly. elsif Is_TSS (Name, TSS_Stream_Input) and then Is_Abstract_Type (Tag_Typ) then return Make_Abstract_Subprogram_Declaration (Loc, Spec); -- Normal spec case, where we return a subprogram declaration else return Make_Subprogram_Declaration (Loc, Spec); end if; end Predef_Spec_Or_Body; ----------------------------- -- Predef_Stream_Attr_Spec -- ----------------------------- function Predef_Stream_Attr_Spec (Loc : Source_Ptr; Tag_Typ : Entity_Id; Name : TSS_Name_Type; For_Body : Boolean := False) return Node_Id is Ret_Type : Entity_Id; begin if Name = TSS_Stream_Input then Ret_Type := Tag_Typ; else Ret_Type := Empty; end if; return Predef_Spec_Or_Body (Loc, Name => Make_TSS_Name (Tag_Typ, Name), Tag_Typ => Tag_Typ, Profile => Build_Stream_Attr_Profile (Loc, Tag_Typ, Name), Ret_Type => Ret_Type, For_Body => For_Body); end Predef_Stream_Attr_Spec; --------------------------------- -- Predefined_Primitive_Bodies -- --------------------------------- function Predefined_Primitive_Bodies (Tag_Typ : Entity_Id; Renamed_Eq : Entity_Id) return List_Id is Loc : constant Source_Ptr := Sloc (Tag_Typ); Res : constant List_Id := New_List; Adj_Call : Node_Id; Decl : Node_Id; Fin_Call : Node_Id; Prim : Elmt_Id; Eq_Needed : Boolean; Eq_Name : Name_Id; Ent : Entity_Id; pragma Warnings (Off, Ent); begin pragma Assert (not Is_Interface (Tag_Typ)); -- See if we have a predefined "=" operator if Present (Renamed_Eq) then Eq_Needed := True; Eq_Name := Chars (Renamed_Eq); -- If the parent is an interface type then it has defined all the -- predefined primitives abstract and we need to check if the type -- has some user defined "=" function which matches the profile of -- the Ada predefined equality operator to avoid generating it. elsif Is_Interface (Etype (Tag_Typ)) then Eq_Needed := True; Eq_Name := Name_Op_Eq; Prim := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim) loop if Chars (Node (Prim)) = Name_Op_Eq and then not Is_Internal (Node (Prim)) and then Present (First_Entity (Node (Prim))) -- The predefined equality primitive must have exactly two -- formals whose type is this tagged type and then Present (Last_Entity (Node (Prim))) and then Next_Entity (First_Entity (Node (Prim))) = Last_Entity (Node (Prim)) and then Etype (First_Entity (Node (Prim))) = Tag_Typ and then Etype (Last_Entity (Node (Prim))) = Tag_Typ then Eq_Needed := False; Eq_Name := No_Name; exit; end if; Next_Elmt (Prim); end loop; else Eq_Needed := False; Eq_Name := No_Name; Prim := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim) loop if Chars (Node (Prim)) = Name_Op_Eq and then Is_Internal (Node (Prim)) then Eq_Needed := True; Eq_Name := Name_Op_Eq; exit; end if; Next_Elmt (Prim); end loop; end if; -- Body of _Size Decl := Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Name_uSize, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))), Ret_Type => Standard_Long_Long_Integer, For_Body => True); Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, New_List ( Make_Simple_Return_Statement (Loc, Expression => Make_Attribute_Reference (Loc, Prefix => Make_Identifier (Loc, Name_X), Attribute_Name => Name_Size))))); Append_To (Res, Decl); -- Bodies for Dispatching stream IO routines. We need these only for -- non-limited types (in the limited case there is no dispatching). -- We also skip them if dispatching or finalization are not available -- or if stream operations are prohibited by restriction No_Streams or -- from use of pragma/aspect No_Tagged_Streams. if Stream_Operation_OK (Tag_Typ, TSS_Stream_Read) and then No (TSS (Tag_Typ, TSS_Stream_Read)) then Build_Record_Read_Procedure (Loc, Tag_Typ, Decl, Ent); Append_To (Res, Decl); end if; if Stream_Operation_OK (Tag_Typ, TSS_Stream_Write) and then No (TSS (Tag_Typ, TSS_Stream_Write)) then Build_Record_Write_Procedure (Loc, Tag_Typ, Decl, Ent); Append_To (Res, Decl); end if; -- Skip body of _Input for the abstract case, since the corresponding -- spec is abstract (see Predef_Spec_Or_Body). if not Is_Abstract_Type (Tag_Typ) and then Stream_Operation_OK (Tag_Typ, TSS_Stream_Input) and then No (TSS (Tag_Typ, TSS_Stream_Input)) then Build_Record_Or_Elementary_Input_Function (Loc, Tag_Typ, Decl, Ent); Append_To (Res, Decl); end if; if Stream_Operation_OK (Tag_Typ, TSS_Stream_Output) and then No (TSS (Tag_Typ, TSS_Stream_Output)) then Build_Record_Or_Elementary_Output_Procedure (Loc, Tag_Typ, Decl, Ent); Append_To (Res, Decl); end if; -- Ada 2005: Generate bodies for the following primitive operations for -- limited interfaces and synchronized types that implement a limited -- interface. -- disp_asynchronous_select -- disp_conditional_select -- disp_get_prim_op_kind -- disp_get_task_id -- disp_timed_select -- The interface versions will have null bodies -- Disable the generation of these bodies if No_Dispatching_Calls, -- Ravenscar or ZFP is active. -- In VM targets we define these primitives in all root tagged types -- that are not interface types. Done because in VM targets we don't -- have secondary dispatch tables and any derivation of Tag_Typ may -- cover limited interfaces (which always have these primitives since -- they may be ancestors of synchronized interface types). if Ada_Version >= Ada_2005 and then not Is_Interface (Tag_Typ) and then ((Is_Interface (Etype (Tag_Typ)) and then Is_Limited_Record (Etype (Tag_Typ))) or else (Is_Concurrent_Record_Type (Tag_Typ) and then Has_Interfaces (Tag_Typ)) or else (not Tagged_Type_Expansion and then Tag_Typ = Root_Type (Tag_Typ))) and then not Restriction_Active (No_Dispatching_Calls) and then not Restriction_Active (No_Select_Statements) and then RTE_Available (RE_Select_Specific_Data) then Append_To (Res, Make_Disp_Asynchronous_Select_Body (Tag_Typ)); Append_To (Res, Make_Disp_Conditional_Select_Body (Tag_Typ)); Append_To (Res, Make_Disp_Get_Prim_Op_Kind_Body (Tag_Typ)); Append_To (Res, Make_Disp_Get_Task_Id_Body (Tag_Typ)); Append_To (Res, Make_Disp_Requeue_Body (Tag_Typ)); Append_To (Res, Make_Disp_Timed_Select_Body (Tag_Typ)); end if; if not Is_Limited_Type (Tag_Typ) and then not Is_Interface (Tag_Typ) then -- Body for equality if Eq_Needed then Decl := Make_Eq_Body (Tag_Typ, Eq_Name); Append_To (Res, Decl); end if; -- Body for inequality (if required) Decl := Make_Neq_Body (Tag_Typ); if Present (Decl) then Append_To (Res, Decl); end if; -- Body for dispatching assignment Decl := Predef_Spec_Or_Body (Loc, Tag_Typ => Tag_Typ, Name => Name_uAssign, Profile => New_List ( Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_X), Out_Present => True, Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc)), Make_Parameter_Specification (Loc, Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y), Parameter_Type => New_Occurrence_Of (Tag_Typ, Loc))), For_Body => True); Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, New_List ( Make_Assignment_Statement (Loc, Name => Make_Identifier (Loc, Name_X), Expression => Make_Identifier (Loc, Name_Y))))); Append_To (Res, Decl); end if; -- Generate empty bodies of routines Deep_Adjust and Deep_Finalize for -- tagged types which do not contain controlled components. -- Do not generate the routines if finalization is disabled if Restriction_Active (No_Finalization) then null; elsif not Has_Controlled_Component (Tag_Typ) then if not Is_Limited_Type (Tag_Typ) then Adj_Call := Empty; Decl := Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust, True); if Is_Controlled (Tag_Typ) then Adj_Call := Make_Adjust_Call ( Obj_Ref => Make_Identifier (Loc, Name_V), Typ => Tag_Typ); end if; if No (Adj_Call) then Adj_Call := Make_Null_Statement (Loc); end if; Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Adj_Call))); Append_To (Res, Decl); end if; Fin_Call := Empty; Decl := Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Finalize, True); if Is_Controlled (Tag_Typ) then Fin_Call := Make_Final_Call (Obj_Ref => Make_Identifier (Loc, Name_V), Typ => Tag_Typ); end if; if No (Fin_Call) then Fin_Call := Make_Null_Statement (Loc); end if; Set_Handled_Statement_Sequence (Decl, Make_Handled_Sequence_Of_Statements (Loc, Statements => New_List (Fin_Call))); Append_To (Res, Decl); end if; return Res; end Predefined_Primitive_Bodies; --------------------------------- -- Predefined_Primitive_Freeze -- --------------------------------- function Predefined_Primitive_Freeze (Tag_Typ : Entity_Id) return List_Id is Res : constant List_Id := New_List; Prim : Elmt_Id; Frnodes : List_Id; begin Prim := First_Elmt (Primitive_Operations (Tag_Typ)); while Present (Prim) loop if Is_Predefined_Dispatching_Operation (Node (Prim)) then Frnodes := Freeze_Entity (Node (Prim), Tag_Typ); if Present (Frnodes) then Append_List_To (Res, Frnodes); end if; end if; Next_Elmt (Prim); end loop; return Res; end Predefined_Primitive_Freeze; ------------------------- -- Stream_Operation_OK -- ------------------------- function Stream_Operation_OK (Typ : Entity_Id; Operation : TSS_Name_Type) return Boolean is Has_Predefined_Or_Specified_Stream_Attribute : Boolean := False; begin -- Special case of a limited type extension: a default implementation -- of the stream attributes Read or Write exists if that attribute -- has been specified or is available for an ancestor type; a default -- implementation of the attribute Output (resp. Input) exists if the -- attribute has been specified or Write (resp. Read) is available for -- an ancestor type. The last condition only applies under Ada 2005. if Is_Limited_Type (Typ) and then Is_Tagged_Type (Typ) then if Operation = TSS_Stream_Read then Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Read (Typ); elsif Operation = TSS_Stream_Write then Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Write (Typ); elsif Operation = TSS_Stream_Input then Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Input (Typ) or else (Ada_Version >= Ada_2005 and then Stream_Operation_OK (Typ, TSS_Stream_Read)); elsif Operation = TSS_Stream_Output then Has_Predefined_Or_Specified_Stream_Attribute := Has_Specified_Stream_Output (Typ) or else (Ada_Version >= Ada_2005 and then Stream_Operation_OK (Typ, TSS_Stream_Write)); end if; -- Case of inherited TSS_Stream_Read or TSS_Stream_Write if not Has_Predefined_Or_Specified_Stream_Attribute and then Is_Derived_Type (Typ) and then (Operation = TSS_Stream_Read or else Operation = TSS_Stream_Write) then Has_Predefined_Or_Specified_Stream_Attribute := Present (Find_Inherited_TSS (Base_Type (Etype (Typ)), Operation)); end if; end if; -- If the type is not limited, or else is limited but the attribute is -- explicitly specified or is predefined for the type, then return True, -- unless other conditions prevail, such as restrictions prohibiting -- streams or dispatching operations. We also return True for limited -- interfaces, because they may be extended by nonlimited types and -- permit inheritance in this case (addresses cases where an abstract -- extension doesn't get 'Input declared, as per comments below, but -- 'Class'Input must still be allowed). Note that attempts to apply -- stream attributes to a limited interface or its class-wide type -- (or limited extensions thereof) will still get properly rejected -- by Check_Stream_Attribute. -- We exclude the Input operation from being a predefined subprogram in -- the case where the associated type is an abstract extension, because -- the attribute is not callable in that case, per 13.13.2(49/2). Also, -- we don't want an abstract version created because types derived from -- the abstract type may not even have Input available (for example if -- derived from a private view of the abstract type that doesn't have -- a visible Input). -- Do not generate stream routines for type Finalization_Master because -- a master may never appear in types and therefore cannot be read or -- written. return (not Is_Limited_Type (Typ) or else Is_Interface (Typ) or else Has_Predefined_Or_Specified_Stream_Attribute) and then (Operation /= TSS_Stream_Input or else not Is_Abstract_Type (Typ) or else not Is_Derived_Type (Typ)) and then not Has_Unknown_Discriminants (Typ) and then not (Is_Interface (Typ) and then (Is_Task_Interface (Typ) or else Is_Protected_Interface (Typ) or else Is_Synchronized_Interface (Typ))) and then not Restriction_Active (No_Streams) and then not Restriction_Active (No_Dispatch) and then No (No_Tagged_Streams_Pragma (Typ)) and then not No_Run_Time_Mode and then RTE_Available (RE_Tag) and then No (Type_Without_Stream_Operation (Typ)) and then RTE_Available (RE_Root_Stream_Type) and then not Is_RTE (Typ, RE_Finalization_Master); end Stream_Operation_OK; end Exp_Ch3;
-- SPDX-License-Identifier: Apache-2.0 -- -- Copyright (c) 2016 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. package Orka.SIMD.AVX.Doubles.Logical is pragma Pure; function And_Not (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_andnpd256"; function "and" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_andpd256"; function "or" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_orpd256"; function "xor" (Left, Right : m256d) return m256d with Import, Convention => Intrinsic, External_Name => "__builtin_ia32_xorpd256"; end Orka.SIMD.AVX.Doubles.Logical;
with GMP.Root_F; generic Precision : in GMP.Precision := Default_Precision; package GMP.Generic_F is pragma Preelaborate; type MP_Float is new Root_F.MP_Float (Precision); -- conversions function To_MP_Float (X : Long_Float) return MP_Float; -- function To_Long_Float (X : MP_Float) return Long_Float; -- this function is inherited pragma Inline (To_MP_Float); -- formatting -- function Image (Value : MP_Float; Base : Number_Base := 10) return String; -- this function is inherited function Value (Image : String; Base : Number_Base := 10) return MP_Float; pragma Inline (Value); -- relational operators are inherited -- unary adding operators function "+" (Right : MP_Float) return MP_Float; function "-" (Right : MP_Float) return MP_Float; pragma Inline ("+"); pragma Inline ("-"); -- binary adding operators function "+" (Left, Right : MP_Float) return MP_Float; function "-" (Left, Right : MP_Float) return MP_Float; pragma Inline ("+"); pragma Inline ("-"); -- multiplying operators function "*" (Left, Right : MP_Float) return MP_Float; function "/" (Left, Right : MP_Float) return MP_Float; pragma Inline ("*"); pragma Inline ("/"); -- highest precedence operators function "**" (Left : MP_Float; Right : Integer) return MP_Float; pragma Inline ("**"); end GMP.Generic_F;
pragma Ada_2012; package body Protypo.Api.Engine_Values.Array_Wrappers is type Wrapper_Access is access Array_Wrapper; ------------------ -- Make_Wrapper -- ------------------ function Make_Wrapper (Init : Array_Type) return Handlers.Ambivalent_Interface_Access is Result : constant Wrapper_Access := new Array_Wrapper'(A => Engine_Value_Array_Wrappers.Make_Wrapper); begin for Idx in Init'Range loop Result.Set (Index => Idx, Value => Init (Idx)); end loop; return Handlers.Ambivalent_Interface_Access (Result); end Make_Wrapper; ------------ -- Append -- ------------ procedure Append (Container : in out Array_Wrapper; Value : Element_Type) is begin Container.A.Append (Create (Value)); end Append; --------- -- Set -- --------- procedure Set (Container : in out Array_Wrapper; Index : Index_Type; Value : Element_Type) is begin Container.A.Set (Index => Index, Value => Create (Value)); end Set; end Protypo.Api.Engine_Values.Array_Wrappers;
-- 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.Record_Component_Associations; package Program.Elements.Record_Aggregates is pragma Pure (Program.Elements.Record_Aggregates); type Record_Aggregate is limited interface and Program.Elements.Expressions.Expression; type Record_Aggregate_Access is access all Record_Aggregate'Class with Storage_Size => 0; not overriding function Components (Self : Record_Aggregate) return Program.Elements.Record_Component_Associations .Record_Component_Association_Vector_Access is abstract; type Record_Aggregate_Text is limited interface; type Record_Aggregate_Text_Access is access all Record_Aggregate_Text'Class with Storage_Size => 0; not overriding function To_Record_Aggregate_Text (Self : aliased in out Record_Aggregate) return Record_Aggregate_Text_Access is abstract; not overriding function Left_Bracket_Token (Self : Record_Aggregate_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; not overriding function Right_Bracket_Token (Self : Record_Aggregate_Text) return not null Program.Lexical_Elements.Lexical_Element_Access is abstract; end Program.Elements.Record_Aggregates;
-- This spec has been automatically generated from STM32L4x2.svd pragma Restrictions (No_Elaboration_Code); pragma Ada_2012; pragma Style_Checks (Off); with HAL; with System; package STM32_SVD.USB is pragma Preelaborate; --------------- -- Registers -- --------------- subtype EP0R_EA_Field is HAL.UInt4; subtype EP0R_STAT_TX_Field is HAL.UInt2; subtype EP0R_EP_TYPE_Field is HAL.UInt2; subtype EP0R_STAT_RX_Field is HAL.UInt2; -- endpoint 0 register type EP0R_Register is record -- Endpoint address EA : EP0R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP0R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP0R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP0R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP0R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP1R_EA_Field is HAL.UInt4; subtype EP1R_STAT_TX_Field is HAL.UInt2; subtype EP1R_EP_TYPE_Field is HAL.UInt2; subtype EP1R_STAT_RX_Field is HAL.UInt2; -- endpoint 1 register type EP1R_Register is record -- Endpoint address EA : EP1R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP1R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP1R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP1R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP1R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP2R_EA_Field is HAL.UInt4; subtype EP2R_STAT_TX_Field is HAL.UInt2; subtype EP2R_EP_TYPE_Field is HAL.UInt2; subtype EP2R_STAT_RX_Field is HAL.UInt2; -- endpoint 2 register type EP2R_Register is record -- Endpoint address EA : EP2R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP2R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP2R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP2R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP2R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP3R_EA_Field is HAL.UInt4; subtype EP3R_STAT_TX_Field is HAL.UInt2; subtype EP3R_EP_TYPE_Field is HAL.UInt2; subtype EP3R_STAT_RX_Field is HAL.UInt2; -- endpoint 3 register type EP3R_Register is record -- Endpoint address EA : EP3R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP3R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP3R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP3R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP3R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP4R_EA_Field is HAL.UInt4; subtype EP4R_STAT_TX_Field is HAL.UInt2; subtype EP4R_EP_TYPE_Field is HAL.UInt2; subtype EP4R_STAT_RX_Field is HAL.UInt2; -- endpoint 4 register type EP4R_Register is record -- Endpoint address EA : EP4R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP4R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP4R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP4R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP4R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP5R_EA_Field is HAL.UInt4; subtype EP5R_STAT_TX_Field is HAL.UInt2; subtype EP5R_EP_TYPE_Field is HAL.UInt2; subtype EP5R_STAT_RX_Field is HAL.UInt2; -- endpoint 5 register type EP5R_Register is record -- Endpoint address EA : EP5R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP5R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP5R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP5R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP5R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP6R_EA_Field is HAL.UInt4; subtype EP6R_STAT_TX_Field is HAL.UInt2; subtype EP6R_EP_TYPE_Field is HAL.UInt2; subtype EP6R_STAT_RX_Field is HAL.UInt2; -- endpoint 6 register type EP6R_Register is record -- Endpoint address EA : EP6R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP6R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP6R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP6R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP6R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype EP7R_EA_Field is HAL.UInt4; subtype EP7R_STAT_TX_Field is HAL.UInt2; subtype EP7R_EP_TYPE_Field is HAL.UInt2; subtype EP7R_STAT_RX_Field is HAL.UInt2; -- endpoint 7 register type EP7R_Register is record -- Endpoint address EA : EP7R_EA_Field := 16#0#; -- Status bits, for transmission transfers STAT_TX : EP7R_STAT_TX_Field := 16#0#; -- Data Toggle, for transmission transfers DTOG_TX : Boolean := False; -- Correct Transfer for transmission CTR_TX : Boolean := False; -- Endpoint kind EP_KIND : Boolean := False; -- Endpoint type EP_TYPE : EP7R_EP_TYPE_Field := 16#0#; -- Setup transaction completed SETUP : Boolean := False; -- Status bits, for reception transfers STAT_RX : EP7R_STAT_RX_Field := 16#0#; -- Data Toggle, for reception transfers DTOG_RX : Boolean := False; -- Correct transfer for reception CTR_RX : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for EP7R_Register use record EA at 0 range 0 .. 3; STAT_TX at 0 range 4 .. 5; DTOG_TX at 0 range 6 .. 6; CTR_TX at 0 range 7 .. 7; EP_KIND at 0 range 8 .. 8; EP_TYPE at 0 range 9 .. 10; SETUP at 0 range 11 .. 11; STAT_RX at 0 range 12 .. 13; DTOG_RX at 0 range 14 .. 14; CTR_RX at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; -- control register type CNTR_Register is record -- Force USB Reset FRES : Boolean := True; -- Power down PDWN : Boolean := True; -- Low-power mode LPMODE : Boolean := False; -- Force suspend FSUSP : Boolean := False; -- Resume request RESUME : Boolean := False; -- LPM L1 Resume request L1RESUME : Boolean := False; -- unspecified Reserved_6_6 : HAL.Bit := 16#0#; -- LPM L1 state request interrupt mask L1REQM : Boolean := False; -- Expected start of frame interrupt mask ESOFM : Boolean := False; -- Start of frame interrupt mask SOFM : Boolean := False; -- USB reset interrupt mask RESETM : Boolean := False; -- Suspend mode interrupt mask SUSPM : Boolean := False; -- Wakeup interrupt mask WKUPM : Boolean := False; -- Error interrupt mask ERRM : Boolean := False; -- Packet memory area over / underrun interrupt mask PMAOVRM : Boolean := False; -- Correct transfer interrupt mask CTRM : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for CNTR_Register use record FRES at 0 range 0 .. 0; PDWN at 0 range 1 .. 1; LPMODE at 0 range 2 .. 2; FSUSP at 0 range 3 .. 3; RESUME at 0 range 4 .. 4; L1RESUME at 0 range 5 .. 5; Reserved_6_6 at 0 range 6 .. 6; L1REQM at 0 range 7 .. 7; ESOFM at 0 range 8 .. 8; SOFM at 0 range 9 .. 9; RESETM at 0 range 10 .. 10; SUSPM at 0 range 11 .. 11; WKUPM at 0 range 12 .. 12; ERRM at 0 range 13 .. 13; PMAOVRM at 0 range 14 .. 14; CTRM at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype ISTR_EP_ID_Field is HAL.UInt4; -- interrupt status register type ISTR_Register is record -- Read-only. Endpoint Identifier EP_ID : ISTR_EP_ID_Field := 16#0#; -- Read-only. Direction of transaction DIR : Boolean := False; -- unspecified Reserved_5_6 : HAL.UInt2 := 16#0#; -- LPM L1 state request L1REQ : Boolean := False; -- Expected start frame ESOF : Boolean := False; -- start of frame SOF : Boolean := False; -- reset request RESET : Boolean := False; -- Suspend mode request SUSP : Boolean := False; -- Wakeup WKUP : Boolean := False; -- Error ERR : Boolean := False; -- Packet memory area over / underrun PMAOVR : Boolean := False; -- Read-only. Correct transfer CTR : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for ISTR_Register use record EP_ID at 0 range 0 .. 3; DIR at 0 range 4 .. 4; Reserved_5_6 at 0 range 5 .. 6; L1REQ at 0 range 7 .. 7; ESOF at 0 range 8 .. 8; SOF at 0 range 9 .. 9; RESET at 0 range 10 .. 10; SUSP at 0 range 11 .. 11; WKUP at 0 range 12 .. 12; ERR at 0 range 13 .. 13; PMAOVR at 0 range 14 .. 14; CTR at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype FNR_FN_Field is HAL.UInt11; subtype FNR_LSOF_Field is HAL.UInt2; -- frame number register type FNR_Register is record -- Read-only. Frame number FN : FNR_FN_Field; -- Read-only. Lost SOF LSOF : FNR_LSOF_Field; -- Read-only. Locked LCK : Boolean; -- Read-only. Receive data - line status RXDM : Boolean; -- Read-only. Receive data + line status RXDP : Boolean; -- unspecified Reserved_16_31 : HAL.UInt16; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for FNR_Register use record FN at 0 range 0 .. 10; LSOF at 0 range 11 .. 12; LCK at 0 range 13 .. 13; RXDM at 0 range 14 .. 14; RXDP at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype DADDR_ADD_Field is HAL.UInt7; -- device address type DADDR_Register is record -- Device address ADD : DADDR_ADD_Field := 16#0#; -- Enable function EF : Boolean := False; -- unspecified Reserved_8_31 : HAL.UInt24 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for DADDR_Register use record ADD at 0 range 0 .. 6; EF at 0 range 7 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; subtype BTABLE_BTABLE_Field is HAL.UInt13; -- Buffer table address type BTABLE_Register is record -- unspecified Reserved_0_2 : HAL.UInt3 := 16#0#; -- Buffer table BTABLE : BTABLE_BTABLE_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 BTABLE_Register use record Reserved_0_2 at 0 range 0 .. 2; BTABLE at 0 range 3 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; subtype LPMCSR_BESL_Field is HAL.UInt4; -- LPM control and status register type LPMCSR_Register is record -- LPM support enable LPMEN : Boolean := False; -- LPM Token acknowledge enable LPMACK : Boolean := False; -- unspecified Reserved_2_2 : HAL.Bit := 16#0#; -- Read-only. bRemoteWake value REMWAKE : Boolean := False; -- Read-only. BESL value BESL : LPMCSR_BESL_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 LPMCSR_Register use record LPMEN at 0 range 0 .. 0; LPMACK at 0 range 1 .. 1; Reserved_2_2 at 0 range 2 .. 2; REMWAKE at 0 range 3 .. 3; BESL at 0 range 4 .. 7; Reserved_8_31 at 0 range 8 .. 31; end record; -- Battery charging detector type BCDR_Register is record -- Battery charging detector BCDEN : Boolean := False; -- Data contact detection DCDEN : Boolean := False; -- Primary detection PDEN : Boolean := False; -- Secondary detection SDEN : Boolean := False; -- Read-only. Data contact detection DCDET : Boolean := False; -- Read-only. Primary detection PDET : Boolean := False; -- Read-only. Secondary detection SDET : Boolean := False; -- Read-only. DM pull-up detection status PS2DET : Boolean := False; -- unspecified Reserved_8_14 : HAL.UInt7 := 16#0#; -- DP pull-up control DPPU : Boolean := False; -- unspecified Reserved_16_31 : HAL.UInt16 := 16#0#; end record with Volatile_Full_Access, Size => 32, Bit_Order => System.Low_Order_First; for BCDR_Register use record BCDEN at 0 range 0 .. 0; DCDEN at 0 range 1 .. 1; PDEN at 0 range 2 .. 2; SDEN at 0 range 3 .. 3; DCDET at 0 range 4 .. 4; PDET at 0 range 5 .. 5; SDET at 0 range 6 .. 6; PS2DET at 0 range 7 .. 7; Reserved_8_14 at 0 range 8 .. 14; DPPU at 0 range 15 .. 15; Reserved_16_31 at 0 range 16 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- Universal serial bus full-speed device interface type USB_Peripheral is record -- endpoint 0 register EP0R : aliased EP0R_Register; -- endpoint 1 register EP1R : aliased EP1R_Register; -- endpoint 2 register EP2R : aliased EP2R_Register; -- endpoint 3 register EP3R : aliased EP3R_Register; -- endpoint 4 register EP4R : aliased EP4R_Register; -- endpoint 5 register EP5R : aliased EP5R_Register; -- endpoint 6 register EP6R : aliased EP6R_Register; -- endpoint 7 register EP7R : aliased EP7R_Register; -- control register CNTR : aliased CNTR_Register; -- interrupt status register ISTR : aliased ISTR_Register; -- frame number register FNR : aliased FNR_Register; -- device address DADDR : aliased DADDR_Register; -- Buffer table address BTABLE : aliased BTABLE_Register; -- LPM control and status register LPMCSR : aliased LPMCSR_Register; -- Battery charging detector BCDR : aliased BCDR_Register; end record with Volatile; for USB_Peripheral use record EP0R at 16#0# range 0 .. 31; EP1R at 16#4# range 0 .. 31; EP2R at 16#8# range 0 .. 31; EP3R at 16#C# range 0 .. 31; EP4R at 16#10# range 0 .. 31; EP5R at 16#14# range 0 .. 31; EP6R at 16#18# range 0 .. 31; EP7R at 16#1C# range 0 .. 31; CNTR at 16#40# range 0 .. 31; ISTR at 16#44# range 0 .. 31; FNR at 16#48# range 0 .. 31; DADDR at 16#4C# range 0 .. 31; BTABLE at 16#50# range 0 .. 31; LPMCSR at 16#54# range 0 .. 31; BCDR at 16#58# range 0 .. 31; end record; -- Universal serial bus full-speed device interface USB_FS_Periph : aliased USB_Peripheral with Import, Address => System'To_Address (16#40006800#); -- Universal serial bus full-speed device interface USB_SRAM_Periph : aliased USB_Peripheral with Import, Address => System'To_Address (16#40006C00#); end STM32_SVD.USB;
with Ada.Text_IO; with Ada.Integer_Text_IO; with Ada.Containers.Vectors; use Ada.Text_IO; use Ada.Integer_Text_IO; use Ada.Containers; procedure Euler is package Integer_Vectors is new Vectors(Natural, Integer); Fibs : Integer_Vectors.Vector; Last : Integer_Vectors.Cursor; Second_To_Last : Integer_Vectors.Cursor; Cursor : Integer_Vectors.Cursor; Sum : Integer := 0; begin Integer_Vectors.Append(Fibs, 0); Integer_Vectors.Append(Fibs, 1); Last := Integer_Vectors.Last(Fibs); Second_To_Last := Integer_Vectors.Previous(Last); while Integer_Vectors.Element(Last) + Integer_Vectors.Element(Second_To_Last) < 4000000 loop Integer_Vectors.Append(Fibs, Integer_Vectors.Element(Last) + Integer_Vectors.Element(Second_To_Last)); Last := Integer_Vectors.Last(Fibs); Second_To_Last := Integer_Vectors.Previous(Last); end loop; Cursor := Integer_Vectors.First(Fibs); while Integer_Vectors.Has_Element(Cursor) loop if (Integer_Vectors.Element(Cursor) mod 2) = 0 then sum := (sum + Integer_Vectors.Element(Cursor)); end if; Cursor := Integer_Vectors.Next(Cursor); end loop; put(Item => sum, Width => 1); new_line; end Euler;
with Memory.DRAM; use type Memory.DRAM.DRAM_Pointer; with Util; use Util; separate (Parser) procedure Parse_DRAM(parser : in out Parser_Type; result : out Memory_Pointer) is ptr : DRAM.DRAM_Pointer := null; cas_cycles : Time_Type := 5; rcd_cycles : Time_Type := 5; rp_cycles : Time_Type := 5; wb_cycles : Time_Type := 0; word_size : Positive := 8; page_size : Positive := 1024; page_count : Positive := 16384; width : Positive := 2; burst_size : Positive := 1; multiplier : Time_Type := 1; open_page : Boolean := True; begin while Get_Type(parser) = Open loop Match(parser, Open); declare name : constant String := Get_Value(parser); begin Match(parser, Literal); declare value : constant String := Get_Value(parser); begin Match(parser, Literal); if name = "cas_cycles" then cas_cycles := Time_Type'Value(value); elsif name = "rcd_cycles" then rcd_cycles := Time_Type'Value(value); elsif name = "rp_cycles" then rp_cycles := Time_Type'Value(value); elsif name = "wb_cycles" then wb_cycles := Time_Type'Value(value); elsif name = "word_size" then word_size := Positive'Value(value); elsif name = "page_size" then page_size := Positive'Value(value); elsif name = "page_count" then page_count := Positive'Value(value); elsif name = "width" then width := Positive'Value(value); elsif name = "multiplier" then multiplier := Time_Type'Value(value); elsif name = "open_page" then open_page := Parse_Boolean(value); elsif name = "burst_size" then burst_size := Positive'Value(value); else Raise_Error(parser, "invalid dram attribute: " & name); end if; end; end; Match(parser, Close); end loop; ptr := DRAM.Create_DRAM(cas_cycles, rcd_cycles, rp_cycles, wb_cycles, multiplier, word_size, page_size, page_count, width, burst_size, open_page); if ptr = null then Raise_Error(parser, "invalid dram configuration"); end if; result := Memory_Pointer(ptr); exception when Data_Error | Constraint_Error => Raise_Error(parser, "invalid value in dram"); end Parse_DRAM;
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- S I N P U T -- -- -- -- 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 input routines used for reading the -- input source file. The actual I/O routines are in OS_Interface, -- with this module containing only the system independent processing. -- General Note: throughout the compiler, we use the term line or source -- line to refer to a physical line in the source, terminated by the end of -- physical line sequence. -- There are two distinct concepts of line terminator in GNAT -- A logical line terminator is what corresponds to the "end of a line" as -- described in RM 2.2 (13). Any of the characters FF, LF, CR or VT or any -- wide character that is a Line or Paragraph Separator acts as an end of -- logical line in this sense, and it is essentially irrelevant whether one -- or more appears in sequence (since if a sequence of such characters is -- regarded as separate ends of line, then the intervening logical lines -- are null in any case). -- A physical line terminator is a sequence of format effectors that is -- treated as ending a physical line. Physical lines have no Ada semantic -- significance, but they are significant for error reporting purposes, -- since errors are identified by line and column location. -- In GNAT, a physical line is ended by any of the sequences LF, CR/LF, or -- CR. LF is used in typical Unix systems, CR/LF in DOS systems, and CR -- alone in System 7. In addition, we recognize any of these sequences in -- any of the operating systems, for better behavior in treating foreign -- files (e.g. a Unix file with LF terminators transferred to a DOS system). -- Finally, wide character codes in categories Separator, Line and Separator, -- Paragraph are considered to be physical line terminators. with Alloc; with Casing; use Casing; with Namet; use Namet; with System; with Table; with Types; use Types; package Sinput is type Type_Of_File is ( -- Indicates type of file being read Src, -- Normal Ada source file Config, -- Configuration pragma file Def, -- Preprocessing definition file Preproc); -- Source file with preprocessing commands to be preprocessed type Instance_Id is new Nat; No_Instance_Id : constant Instance_Id; ---------------------------- -- Source License Control -- ---------------------------- -- The following type indicates the license state of a source if it -- is known. type License_Type is (Unknown, -- Licensing status of this source unit is unknown Restricted, -- This is a non-GPL'ed unit that is restricted from depending -- on GPL'ed units (e.g. proprietary code is in this category) GPL, -- This file is licensed under the unmodified GPL. It is not allowed -- to depend on Non_GPL units, and Non_GPL units may not depend on -- this source unit. Modified_GPL, -- This file is licensed under the GNAT modified GPL (see header of -- This file for wording of the modification). It may depend on other -- Modified_GPL units or on unrestricted units. Unrestricted); -- The license on this file is permitted to depend on any other -- units, or have other units depend on it, without violating the -- license of this unit. Examples are public domain units, and -- units defined in the RM). -- The above license status is checked when the appropriate check is -- activated and one source depends on another, and the licensing state -- of both files is known: -- The prohibited combinations are: -- Restricted file may not depend on GPL file -- GPL file may not depend on Restricted file -- Modified GPL file may not depend on Restricted file -- Modified_GPL file may not depend on GPL file -- The reason for the last restriction here is that a client depending -- on a modified GPL file must be sure that the license condition is -- correct considered transitively. -- The licensing status is determined either by the presence of a -- specific pragma License, or by scanning the header for a predefined -- statement, or any file if compiling in -gnatg mode. ----------------------- -- Source File Table -- ----------------------- -- The source file table has an entry for each source file read in for -- this run of the compiler. This table is (default) initialized when -- the compiler is loaded, and simply accumulates entries as compilation -- proceeds and various routines in Sinput and its child packages are -- called to load required source files. -- Virtual entries are also created for generic templates when they are -- instantiated, as described in a separate section later on. -- In the case where there are multiple main units (e.g. in the case of -- the cross-reference tool), this table is not reset between these units, -- so that a given source file is only read once if it is used by two -- separate main units. -- The entries in the table are accessed using a Source_File_Index that -- ranges from 1 to Last_Source_File. Each entry has the following fields. -- Note: fields marked read-only are set by Sinput or one of its child -- packages when a source file table entry is created, and cannot be -- subsequently modified, or alternatively are set only by very special -- circumstances, documented in the comments. -- File_Name : File_Name_Type (read-only) -- Name of the source file (simple name with no directory information) -- Full_File_Name : File_Name_Type (read-only) -- Full file name (full name with directory info), used for generation -- of error messages, etc. -- File_Type : Type_Of_File (read-only) -- Indicates type of file (source file, configuration pragmas file, -- preprocessor definition file, preprocessor input file). -- Reference_Name : File_Name_Type (read-only) -- Name to be used for source file references in error messages where -- only the simple name of the file is required. Identical to File_Name -- unless pragma Source_Reference is used to change it. Only processing -- for the Source_Reference pragma circuit may set this field. -- Full_Ref_Name : File_Name_Type (read-only) -- Name to be used for source file references in error messages where -- the full name of the file is required. Identical to Full_File_Name -- unless pragma Source_Reference is used to change it. Only processing -- for the Source_Reference pragma may set this field. -- Debug_Source_Name : File_Name_Type (read-only) -- Name to be used for source file references in debugging information -- where only the simple name of the file is required. Identical to -- Reference_Name unless the -gnatD (debug source file) switch is used. -- Only processing in Sprint that generates this file is permitted to -- set this field. -- Full_Debug_Name : File_Name_Type (read-only) -- Name to be used for source file references in debugging information -- where the full name of the file is required. This is identical to -- Full_Ref_Name unless the -gnatD (debug source file) switch is used. -- Only processing in Sprint that generates this file is permitted to -- set this field. -- Instance : Instance_Id (read-only) -- For entries corresponding to a generic instantiation, unique -- identifier denoting the full chain of nested instantiations. Set to -- No_Instance_Id for the case of a normal, non-instantiation entry. -- See below for details on the handling of generic instantiations. -- License : License_Type; -- License status of source file -- Num_SRef_Pragmas : Nat; -- Number of source reference pragmas present in source file -- First_Mapped_Line : Logical_Line_Number; -- This field stores logical line number of the first line in the -- file that is not a Source_Reference pragma. If no source reference -- pragmas are used, then the value is set to No_Line_Number. -- Source_Text : Source_Buffer_Ptr (read-only) -- Text of source file. Every source file has a distinct set of -- nonoverlapping bounds, so it is possible to determine which -- file is referenced from a given subscript (Source_Ptr) value. -- Source_First : Source_Ptr; (read-only) -- This is always equal to Source_Text'First, except during -- construction of a debug output file (*.dg), when Source_Text = null, -- and Source_First is the size so far. Likewise for Last. -- Source_Last : Source_Ptr; (read-only) -- Same idea as Source_Last, but for Last -- Time_Stamp : Time_Stamp_Type; (read-only) -- Time stamp of the source file -- Source_Checksum : Word; -- Computed checksum for contents of source file. See separate section -- later on in this spec for a description of the checksum algorithm. -- Last_Source_Line : Physical_Line_Number; -- Physical line number of last source line. While a file is being -- read, this refers to the last line scanned. Once a file has been -- completely scanned, it is the number of the last line in the file, -- and hence also gives the number of source lines in the file. -- Keyword_Casing : Casing_Type; -- Casing style used in file for keyword casing. This is initialized -- to Unknown, and then set from the first occurrence of a keyword. -- This value is used only for formatting of error messages. -- Identifier_Casing : Casing_Type; -- Casing style used in file for identifier casing. This is initialized -- to Unknown, and then set from an identifier in the program as soon as -- one is found whose casing is sufficiently clear to make a decision. -- This value is used for formatting of error messages, and also is used -- in the detection of keywords misused as identifiers. -- Inlined_Call : Source_Ptr; -- Source file location of the subprogram call if this source file entry -- represents an inlined body or an inherited pragma. Set to No_Location -- otherwise. This field is read-only for clients. -- Inlined_Body : Boolean; -- This can only be set True if Instantiation has a value other than -- No_Location. If true it indicates that the instantiation is actually -- an instance of an inlined body. -- Inherited_Pragma : Boolean; -- This can only be set True if Instantiation has a value other than -- No_Location. If true it indicates that the instantiation is actually -- an inherited class-wide pre- or postcondition. -- Template : Source_File_Index; (read-only) -- Source file index of the source file containing the template if this -- is a generic instantiation. Set to No_Source_File for the normal case -- of a non-instantiation entry. See Sinput-L for details. -- Unit : Unit_Number_Type; -- Identifies the unit contained in this source file. Set by -- Initialize_Scanner, must not be subsequently altered. -- The source file table is accessed by clients using the following -- subprogram interface: subtype SFI is Source_File_Index; System_Source_File_Index : SFI; -- The file system.ads is always read by the compiler to determine the -- settings of the target parameters in the private part of System. This -- variable records the source file index of system.ads. Typically this -- will be 1 since system.ads is read first. function Debug_Source_Name (S : SFI) return File_Name_Type; -- WARNING: There is a matching C declaration of this subprogram in fe.h function File_Name (S : SFI) return File_Name_Type; function File_Type (S : SFI) return Type_Of_File; function First_Mapped_Line (S : SFI) return Logical_Line_Number; function Full_Debug_Name (S : SFI) return File_Name_Type; function Full_File_Name (S : SFI) return File_Name_Type; function Full_Ref_Name (S : SFI) return File_Name_Type; function Identifier_Casing (S : SFI) return Casing_Type; function Inlined_Body (S : SFI) return Boolean; function Inherited_Pragma (S : SFI) return Boolean; function Inlined_Call (S : SFI) return Source_Ptr; function Instance (S : SFI) return Instance_Id; function Keyword_Casing (S : SFI) return Casing_Type; function Last_Source_Line (S : SFI) return Physical_Line_Number; function License (S : SFI) return License_Type; function Num_SRef_Pragmas (S : SFI) return Nat; function Reference_Name (S : SFI) return File_Name_Type; function Source_Checksum (S : SFI) return Word; function Source_First (S : SFI) return Source_Ptr; function Source_Last (S : SFI) return Source_Ptr; function Source_Text (S : SFI) return Source_Buffer_Ptr; function Template (S : SFI) return Source_File_Index; function Unit (S : SFI) return Unit_Number_Type; function Time_Stamp (S : SFI) return Time_Stamp_Type; procedure Set_Keyword_Casing (S : SFI; C : Casing_Type); procedure Set_Identifier_Casing (S : SFI; C : Casing_Type); procedure Set_License (S : SFI; L : License_Type); procedure Set_Unit (S : SFI; U : Unit_Number_Type); function Last_Source_File return Source_File_Index; -- Index of last source file table entry function Num_Source_Files return Nat; -- Number of source file table entries procedure Initialize; -- Initialize internal tables procedure Lock; -- Lock internal tables procedure Unlock; -- Unlock internal tables Main_Source_File : Source_File_Index := No_Source_File; -- This is set to the source file index of the main unit ----------------------- -- Checksum Handling -- ----------------------- -- As a source file is scanned, a checksum is computed by taking all the -- non-blank characters in the file, excluding comment characters, the -- minus-minus sequence starting a comment, and all control characters -- except ESC. -- The checksum algorithm used is the standard CRC-32 algorithm, as -- implemented by System.CRC32, except that we do not bother with the -- final XOR with all 1 bits. -- This algorithm ensures that the checksum includes all semantically -- significant aspects of the program represented by the source file, -- but is insensitive to layout, presence or contents of comments, wide -- character representation method, or casing conventions outside strings. -- Scans.Checksum is initialized appropriately at the start of scanning -- a file, and copied into the Source_Checksum field of the file table -- entry when the end of file is encountered. ------------------------------------- -- Handling Generic Instantiations -- ------------------------------------- -- As described in Sem_Ch12, a generic instantiation involves making a -- copy of the tree of the generic template. The source locations in -- this tree directly reference the source of the template. However, it -- is also possible to find the location of the instantiation. -- This is achieved as follows. When an instantiation occurs, a new entry -- is made in the source file table. The Source_Text of the instantiation -- points to the same Source_Buffer as the Source_Text of the template, but -- with different bounds. The separate range of Sloc values avoids -- confusion, and means that the Sloc values can still be used to uniquely -- identify the source file table entry. See Set_Dope below for the -- low-level trickery that allows two different pointers to point at the -- same array, but with different bounds. -- The Instantiation_Id field of this source file index entry, set -- to No_Instance_Id for normal entries, instead contains a value that -- uniquely identifies a particular instantiation, and the associated -- entry in the Instances table. The source location of the instantiation -- can be retrieved using function Instantiation below. In the case of -- nested instantiations, the Instances table can be used to trace the -- complete chain of nested instantiations. -- Two routines are used to build the special instance entries in the -- source file table. Create_Instantiation_Source is first called to build -- the virtual source table entry for the instantiation, and then the -- Sloc values in the copy are adjusted using Adjust_Instantiation_Sloc. -- See child unit Sinput.L for details on these two routines. generic with procedure Process (Id : Instance_Id; Inst_Sloc : Source_Ptr); procedure Iterate_On_Instances; -- Execute Process for each entry in the instance table function Instantiation (S : SFI) return Source_Ptr; -- For a source file entry that represents an inlined body, source location -- of the inlined call. For a source file entry that represents an -- inherited pragma, source location of the declaration to which the -- overriding subprogram for the inherited pragma is attached. Otherwise, -- for a source file entry that represents a generic instantiation, source -- location of the instantiation. Returns No_Location in all other cases. ----------------- -- Global Data -- ----------------- Current_Source_File : Source_File_Index := No_Source_File; -- Source_File table index of source file currently being scanned. -- Initialized so that some tools (such as gprbuild) can be built with -- -gnatVa and pragma Initialize_Scalars without problems. Current_Source_Unit : Unit_Number_Type; -- Unit number of source file currently being scanned. The special value -- of No_Unit indicates that the configuration pragma file is currently -- being scanned (this has no entry in the unit table). Source_gnat_adc : Source_File_Index := No_Source_File; -- This is set if a gnat.adc file is present to reference this file Source : Source_Buffer_Ptr; -- Current source (copy of Source_File.Table (Current_Source_Unit).Source) ----------------------------------------- -- Handling of Source Line Terminators -- ----------------------------------------- -- In this section we discuss in detail the issue of terminators used to -- terminate source lines. The RM says that one or more format effectors -- (other than horizontal tab) end a source line, and defines the set of -- such format effectors, but does not talk about exactly how they are -- represented in the source program (since in general the RM is not in -- the business of specifying source program formats). -- The type Types.Line_Terminator is defined as a subtype of Character -- that includes CR/LF/VT/FF. The most common line enders in practice -- are CR (some MAC systems), LF (Unix systems), and CR/LF (DOS/Windows -- systems). Any of these sequences is recognized as ending a physical -- source line, and if multiple such terminators appear (e.g. LF/LF), -- then we consider we have an extra blank line. -- VT and FF are recognized as terminating source lines, but they are -- considered to end a logical line instead of a physical line, so that -- the line numbering ignores such terminators. The use of VT and FF is -- mandated by the standard, and correctly handled in a conforming manner -- by GNAT, but their use is not recommended. -- In addition to the set of characters defined by the type in Types, in -- wide character encoding, then the codes returning True for a call to -- System.UTF_32.Is_UTF_32_Line_Terminator are also recognized as ending a -- source line. This includes the standard codes defined above in addition -- to NEL (NEXT LINE), LINE SEPARATOR and PARAGRAPH SEPARATOR. Again, as in -- the case of VT and FF, the standard requires we recognize these as line -- terminators, but we consider them to be logical line terminators. The -- only physical line terminators recognized are the standard ones (CR, -- LF, or CR/LF). -- However, we do not recognize the NEL (16#85#) character as having the -- significance of an end of line character when operating in normal 8-bit -- Latin-n input mode for the compiler. Instead the rule in this mode is -- that all upper half control codes (16#80# .. 16#9F#) are illegal if they -- occur in program text, and are ignored if they appear in comments. -- First, note that this behavior is fully conforming with the standard. -- The standard has nothing whatever to say about source representation -- and implementations are completely free to make there own rules. In -- this case, in 8-bit mode, GNAT decides that the 16#0085# character is -- not a representation of the NEL character, even though it looks like it. -- If you have NEL's in your program, which you expect to be treated as -- end of line characters, you must use a wide character encoding such as -- UTF-8 for this code to be recognized. -- Second, an explanation of why we take this slightly surprising choice. -- We have never encountered anyone actually using the NEL character to -- end lines. One user raised the issue as a result of some experiments, -- but no one has ever submitted a program encoded this way, in any of -- the possible encodings. It seems that even when using wide character -- codes extensively, the normal approach is to use standard line enders -- (LF or CR/LF). So the failure to recognize NEL in this mode seems to -- have no practical downside. -- Moreover, what we have seen in a significant number of programs from -- multiple sources is the practice of writing all program text in lower -- half (ASCII) form, but using UTF-8 encoded wide characters freely in -- comments, where the comments are terminated by normal line endings -- (LF or CR/LF). The comments do not contain NEL codes, but they can and -- do contain other UTF-8 encoding sequences where one of the bytes is the -- NEL code. Now such programs can of course be compiled in UTF-8 mode, -- but in practice they also compile fine in standard 8-bit mode without -- specifying a character encoding. Since this is common practice, it would -- be a significant upwards incompatibility to recognize NEL in 8-bit mode. ----------------- -- Subprograms -- ----------------- procedure Backup_Line (P : in out Source_Ptr); -- Back up the argument pointer to the start of the previous line. On -- entry, P points to the start of a physical line in the source buffer. -- On return, P is updated to point to the start of the previous line. -- The caller has checked that a Line_Terminator character precedes P so -- that there definitely is a previous line in the source buffer. procedure Build_Location_String (Buf : in out Bounded_String; Loc : Source_Ptr); -- This function builds a string literal of the form "name:line", where -- name is the file name corresponding to Loc, and line is the line number. -- If instantiations are involved, additional suffixes of the same form are -- appended after the separating string " instantiated at ". The returned -- string is appended to Buf. function Build_Location_String (Loc : Source_Ptr) return String; -- Functional form returning a String procedure Check_For_BOM; -- Check if the current source starts with a BOM. Scan_Ptr needs to be at -- the start of the current source. If the current source starts with a -- recognized BOM, then some flags such as Wide_Character_Encoding_Method -- are set accordingly, and the Scan_Ptr on return points past this BOM. -- An error message is output and Unrecoverable_Error raised if an -- unrecognized BOM is detected. The call has no effect if no BOM is found. function Get_Column_Number (P : Source_Ptr) return Column_Number; -- The ones-origin column number of the specified Source_Ptr value is -- determined and returned. Tab characters if present are assumed to -- represent the standard 1,9,17.. spacing pattern. -- WARNING: There is a matching C declaration of this subprogram in fe.h function Get_Logical_Line_Number (P : Source_Ptr) return Logical_Line_Number; -- The line number of the specified source position is obtained by -- doing a binary search on the source positions in the lines table -- for the unit containing the given source position. The returned -- value is the logical line number, already adjusted for the effect -- of source reference pragmas. If P refers to the line of a source -- reference pragma itself, then No_Line is returned. If no source -- reference pragmas have been encountered, the value returned is -- the same as the physical line number. -- WARNING: There is a matching C declaration of this subprogram in fe.h function Get_Logical_Line_Number_Img (P : Source_Ptr) return String; -- Same as above function, but returns the line number as a string of -- decimal digits, with no leading space. Destroys Name_Buffer. function Get_Physical_Line_Number (P : Source_Ptr) return Physical_Line_Number; -- The line number of the specified source position is obtained by -- doing a binary search on the source positions in the lines table -- for the unit containing the given source position. The returned -- value is the physical line number in the source being compiled. function Get_Source_File_Index (S : Source_Ptr) return Source_File_Index; pragma Inline (Get_Source_File_Index); -- Return file table index of file identified by given source pointer -- value. This call must always succeed, since any valid source pointer -- value belongs to some previously loaded source file. -- WARNING: There is a matching C declaration of this subprogram in fe.h function Instantiation_Depth (S : Source_Ptr) return Nat; -- Determine instantiation depth for given Sloc value. A value of -- zero means that the given Sloc is not in an instantiation. function Line_Start (P : Source_Ptr) return Source_Ptr; -- Finds the source position of the start of the line containing the -- given source location. function Line_Start (L : Physical_Line_Number; S : Source_File_Index) return Source_Ptr; -- Finds the source position of the start of the given line in the -- given source file, using a physical line number to identify the line. function Num_Source_Lines (S : Source_File_Index) return Nat; -- Returns the number of source lines (this is equivalent to reading -- the value of Last_Source_Line, but returns Nat rather than a -- physical line number). procedure Register_Source_Ref_Pragma (File_Name : File_Name_Type; Stripped_File_Name : File_Name_Type; Mapped_Line : Nat; Line_After_Pragma : Physical_Line_Number); -- Register a source reference pragma, the parameter File_Name is the -- file name from the pragma, and Stripped_File_Name is this name with -- the directory information stripped. Both these parameters are set -- to No_Name if no file name parameter was given in the pragma. -- (which can only happen for the second and subsequent pragmas). -- Mapped_Line is the line number parameter from the pragma, and -- Line_After_Pragma is the physical line number of the line that -- follows the line containing the Source_Reference pragma. function Original_Location (S : Source_Ptr) return Source_Ptr; -- Given a source pointer S, returns the corresponding source pointer -- value ignoring instantiation copies. For locations that do not -- correspond to instantiation copies of templates, the argument is -- returned unchanged. For locations that do correspond to copies of -- templates from instantiations, the location within the original -- template is returned. This is useful in canonicalizing locations. function Instantiation_Location (S : Source_Ptr) return Source_Ptr; pragma Inline (Instantiation_Location); -- Given a source pointer S, returns the corresponding source pointer -- value of the instantiation if this location is within an instance. -- If S is not within an instance, then this returns No_Location. function Comes_From_Inlined_Body (S : Source_Ptr) return Boolean; pragma Inline (Comes_From_Inlined_Body); -- Given a source pointer S, returns whether it comes from an inlined body. -- This allows distinguishing these source pointers from those that come -- from instantiation of generics, since Instantiation_Location returns a -- valid location in both cases. function Comes_From_Inherited_Pragma (S : Source_Ptr) return Boolean; pragma Inline (Comes_From_Inherited_Pragma); -- Given a source pointer S, returns whether it comes from an inherited -- pragma. This allows distinguishing these source pointers from those -- that come from instantiation of generics, since Instantiation_Location -- returns a valid location in both cases. function Top_Level_Location (S : Source_Ptr) return Source_Ptr; -- Given a source pointer S, returns the argument unchanged if it is -- not in an instantiation. If S is in an instantiation, then it returns -- the location of the top level instantiation, i.e. the outer level -- instantiation in the nested case. function Physical_To_Logical (Line : Physical_Line_Number; S : Source_File_Index) return Logical_Line_Number; -- Given a physical line number in source file whose source index is S, -- return the corresponding logical line number. If the physical line -- number is one containing a Source_Reference pragma, the result will -- be No_Line_Number. procedure Skip_Line_Terminators (P : in out Source_Ptr; Physical : out Boolean); -- On entry, P points to a line terminator that has been encountered, -- which is one of FF,LF,VT,CR or a wide character sequence whose value is -- in category Separator,Line or Separator,Paragraph. P points just past -- the character that was scanned. The purpose of this routine is to -- distinguish physical and logical line endings. A physical line ending -- is one of: -- -- CR on its own (MAC System 7) -- LF on its own (Unix and unix-like systems) -- CR/LF (DOS, Windows) -- Wide character in Separator,Line or Separator,Paragraph category -- -- Note: we no longer recognize LF/CR (which we did in some earlier -- versions of GNAT. The reason for this is that this sequence is not -- used and recognizing it generated confusion. For example given the -- sequence LF/CR/LF we were interpreting that as (LF/CR) ending the -- first line and a blank line ending with CR following, but it is -- clearly better to interpret this as LF, with a blank line terminated -- by CR/LF, given that LF and CR/LF are both in common use, but no -- system we know of uses LF/CR. -- -- A logical line ending (that is not a physical line ending) is one of: -- -- VT on its own -- FF on its own -- -- On return, P is bumped past the line ending sequence (one of the above -- seven possibilities). Physical is set to True to indicate that a -- physical end of line was encountered, in which case this routine also -- makes sure that the lines table for the current source file has an -- appropriate entry for the start of the new physical line. procedure Sloc_Range (N : Node_Id; Min, Max : out Source_Ptr); -- Given a node, returns the minimum and maximum source locations of any -- node in the syntactic subtree for the node. This is not quite the same -- as the locations of the first and last token in the node construct -- because parentheses at the outer level do not have a recorded Sloc. -- -- Note: At each step of the tree traversal, we make sure to go back to -- the Original_Node, since this function is concerned about original -- (source) locations. -- -- Note: if the tree for the expression contains no "real" Sloc values, -- i.e. values > No_Location, then both Min and Max are set to -- Sloc (Original_Node (N)). function Source_Offset (S : Source_Ptr) return Nat; -- Returns the zero-origin offset of the given source location from the -- start of its corresponding unit. This is used for creating canonical -- names in some situations. procedure Write_Location (P : Source_Ptr); -- Writes out a string of the form fff:nn:cc, where fff, nn, cc are the -- file name, line number and column corresponding to the given source -- location. No_Location and Standard_Location appear as the strings -- <no location> and <standard location>. If the location is within an -- instantiation, then the instance location is appended, enclosed in -- square brackets (which can nest if necessary). Note that this routine -- is used only for internal compiler debugging output purposes (which -- is why the somewhat cryptic use of brackets is acceptable). procedure wl (P : Source_Ptr); pragma Export (Ada, wl); -- Equivalent to Write_Location (P); Write_Eol; for calls from GDB procedure Write_Time_Stamp (S : Source_File_Index); -- Writes time stamp of specified file in YY-MM-DD HH:MM.SS format procedure Clear_Source_File_Table; -- This procedure frees memory allocated in the Source_File table (in the -- private). It should only be used when it is guaranteed that all source -- files that have been loaded so far will not be accessed before being -- reloaded. It is intended for tools that parse several times sources, -- to avoid memory leaks. private pragma Inline (File_Name); pragma Inline (Full_File_Name); pragma Inline (File_Type); pragma Inline (Reference_Name); pragma Inline (Full_Ref_Name); pragma Inline (Debug_Source_Name); pragma Inline (Full_Debug_Name); pragma Inline (Instance); pragma Inline (License); pragma Inline (Num_SRef_Pragmas); pragma Inline (First_Mapped_Line); pragma Inline (Source_Text); pragma Inline (Source_First); pragma Inline (Source_Last); pragma Inline (Time_Stamp); pragma Inline (Source_Checksum); pragma Inline (Last_Source_Line); pragma Inline (Keyword_Casing); pragma Inline (Identifier_Casing); pragma Inline (Inlined_Call); pragma Inline (Inlined_Body); pragma Inline (Inherited_Pragma); pragma Inline (Template); pragma Inline (Unit); pragma Inline (Set_Keyword_Casing); pragma Inline (Set_Identifier_Casing); pragma Inline (Last_Source_File); pragma Inline (Num_Source_Files); pragma Inline (Num_Source_Lines); pragma Inline (Line_Start); No_Instance_Id : constant Instance_Id := 0; ------------------------- -- Source_Lines Tables -- ------------------------- type Lines_Table_Type is array (Physical_Line_Number) of Source_Ptr; -- Type used for lines table. The entries are indexed by physical line -- numbers. The values are the starting Source_Ptr values for the start -- of the corresponding physical line. Note that we make this a bogus -- big array, sized as required, so that we avoid the use of fat pointers. type Lines_Table_Ptr is access all Lines_Table_Type; -- Type used for pointers to line tables type Logical_Lines_Table_Type is array (Physical_Line_Number) of Logical_Line_Number; -- Type used for logical lines table. This table is used if a source -- reference pragma is present. It is indexed by physical line numbers, -- and contains the corresponding logical line numbers. An entry that -- corresponds to a source reference pragma is set to No_Line_Number. -- Note that we make this a bogus big array, sized as required, so that -- we avoid the use of fat pointers. type Logical_Lines_Table_Ptr is access all Logical_Lines_Table_Type; -- Type used for pointers to logical line tables ----------------------- -- Source_File Table -- ----------------------- -- See earlier descriptions for meanings of public fields type Source_File_Record is record File_Name : File_Name_Type; Reference_Name : File_Name_Type; Debug_Source_Name : File_Name_Type; Full_Debug_Name : File_Name_Type; Full_File_Name : File_Name_Type; Full_Ref_Name : File_Name_Type; Instance : Instance_Id; Num_SRef_Pragmas : Nat; First_Mapped_Line : Logical_Line_Number; Source_Text : Source_Buffer_Ptr; Source_First : Source_Ptr; Source_Last : Source_Ptr; Source_Checksum : Word; Last_Source_Line : Physical_Line_Number; Template : Source_File_Index; Unit : Unit_Number_Type; Time_Stamp : Time_Stamp_Type; File_Type : Type_Of_File; Inlined_Call : Source_Ptr; Inlined_Body : Boolean; Inherited_Pragma : Boolean; License : License_Type; Keyword_Casing : Casing_Type; Identifier_Casing : Casing_Type; -- The following fields are for internal use only (i.e. only in the -- body of Sinput or its children, with no direct access by clients). Sloc_Adjust : Source_Ptr; -- A value to be added to Sloc values for this file to reference the -- corresponding lines table. This is zero for the non-instantiation -- case, and set so that the addition references the ultimate template -- for the instantiation case. See Sinput-L for further details. Lines_Table : Lines_Table_Ptr; -- Pointer to lines table for this source. Updated as additional -- lines are accessed using the Skip_Line_Terminators procedure. -- Note: the lines table for an instantiation entry refers to the -- original line numbers of the template see Sinput-L for details. Logical_Lines_Table : Logical_Lines_Table_Ptr; -- Pointer to logical lines table for this source. Non-null only if -- a source reference pragma has been processed. Updated as lines -- are accessed using the Skip_Line_Terminators procedure. Lines_Table_Max : Physical_Line_Number; -- Maximum subscript values for currently allocated Lines_Table -- and (if present) the allocated Logical_Lines_Table. The value -- Max_Source_Line gives the maximum used value, this gives the -- maximum allocated value. Index : Source_File_Index := 123456789; -- for debugging end record; -- The following representation clause ensures that the above record -- has no holes. We do this so that when instances of this record are -- written by Tree_Gen, we do not write uninitialized values to the file. AS : constant Pos := Standard'Address_Size; for Source_File_Record use record File_Name at 0 range 0 .. 31; Reference_Name at 4 range 0 .. 31; Debug_Source_Name at 8 range 0 .. 31; Full_Debug_Name at 12 range 0 .. 31; Full_File_Name at 16 range 0 .. 31; Full_Ref_Name at 20 range 0 .. 31; Instance at 48 range 0 .. 31; Num_SRef_Pragmas at 24 range 0 .. 31; First_Mapped_Line at 28 range 0 .. 31; Source_First at 32 range 0 .. 31; Source_Last at 36 range 0 .. 31; Source_Checksum at 40 range 0 .. 31; Last_Source_Line at 44 range 0 .. 31; Template at 52 range 0 .. 31; Unit at 56 range 0 .. 31; Time_Stamp at 60 range 0 .. 8 * Time_Stamp_Length - 1; File_Type at 74 range 0 .. 7; Inlined_Call at 88 range 0 .. 31; Inlined_Body at 75 range 0 .. 0; Inherited_Pragma at 75 range 1 .. 1; License at 76 range 0 .. 7; Keyword_Casing at 77 range 0 .. 7; Identifier_Casing at 78 range 0 .. 15; Sloc_Adjust at 80 range 0 .. 31; Lines_Table_Max at 84 range 0 .. 31; Index at 92 range 0 .. 31; -- The following fields are pointers, so we have to specialize their -- lengths using pointer size, obtained above as Standard'Address_Size. -- Note that Source_Text is a fat pointer, so it has size = AS*2. Source_Text at 96 range 0 .. AS * 2 - 1; Lines_Table at 96 range AS * 2 .. AS * 3 - 1; Logical_Lines_Table at 96 range AS * 3 .. AS * 4 - 1; end record; -- Source_File_Record for Source_File_Record'Size use 96 * 8 + AS * 4; -- This ensures that we did not leave out any fields package Source_File is new Table.Table (Table_Component_Type => Source_File_Record, Table_Index_Type => Source_File_Index, Table_Low_Bound => 1, Table_Initial => Alloc.Source_File_Initial, Table_Increment => Alloc.Source_File_Increment, Table_Name => "Source_File"); -- Auxiliary table containing source location of instantiations. Index 0 -- is used for code that does not come from an instance. package Instances is new Table.Table (Table_Component_Type => Source_Ptr, Table_Index_Type => Instance_Id, Table_Low_Bound => 0, Table_Initial => Alloc.Source_File_Initial, Table_Increment => Alloc.Source_File_Increment, Table_Name => "Instances"); ----------------- -- Subprograms -- ----------------- procedure Alloc_Line_Tables (S : in out Source_File_Record; New_Max : Nat); -- Allocate or reallocate the lines table for the given source file so -- that it can accommodate at least New_Max lines. Also allocates or -- reallocates logical lines table if source ref pragmas are present. procedure Add_Line_Tables_Entry (S : in out Source_File_Record; P : Source_Ptr); -- Increment line table size by one (reallocating the lines table if -- needed) and set the new entry to contain the value P. Also bumps -- the Source_Line_Count field. If source reference pragmas are -- present, also increments logical lines table size by one, and -- sets new entry. procedure Trim_Lines_Table (S : Source_File_Index); -- Set lines table size for entry S in the source file table to -- correspond to the current value of Num_Source_Lines, releasing -- any unused storage. This is used by Sinput.L and Sinput.D. procedure Set_Source_File_Index_Table (Xnew : Source_File_Index); -- Sets entries in the Source_File_Index_Table for the newly created -- Source_File table entry whose index is Xnew. The Source_First and -- Source_Last fields of this entry must be set before the call. -- See package body for details. type Dope_Rec is record First, Last : Source_Ptr'Base; end record; Dope_Rec_Size : constant := 2 * Source_Ptr'Base'Size; for Dope_Rec'Size use Dope_Rec_Size; for Dope_Rec'Alignment use Dope_Rec_Size / 8; type Dope_Ptr is access all Dope_Rec; procedure Set_Dope (Src : System.Address; New_Dope : Dope_Ptr); -- Src is the address of a variable of type Source_Buffer_Ptr, which is a -- fat pointer. This sets the dope part of the fat pointer to point to the -- specified New_Dope. This low-level processing is used to make the -- Source_Text of an instance point to the same text as the template, but -- with different bounds. procedure Free_Dope (Src : System.Address); -- Calls Unchecked_Deallocation on the dope part of the fat pointer Src procedure Free_Source_Buffer (Src : in out Source_Buffer_Ptr); -- Deallocates the source buffer end Sinput;
-- This file is generated by SWIG. Please do not modify by hand. -- with Interfaces; with swig; with Interfaces.C; with Interfaces.C.Pointers; package xcb.xcb_glx_get_color_table_reply_t is -- Item -- type Item is record response_type : aliased Interfaces.Unsigned_8; pad0 : aliased Interfaces.Unsigned_8; sequence : aliased Interfaces.Unsigned_16; length : aliased Interfaces.Unsigned_32; pad1 : aliased swig.int8_t_Array (0 .. 7); width : aliased Interfaces.Integer_32; pad2 : aliased swig.int8_t_Array (0 .. 11); end record; -- Item_Array -- type Item_Array is array (Interfaces.C .size_t range <>) of aliased xcb.xcb_glx_get_color_table_reply_t .Item; -- Pointer -- package C_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_color_table_reply_t.Item, Element_Array => xcb.xcb_glx_get_color_table_reply_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_glx_get_color_table_reply_t .Pointer; -- Pointer_Pointer -- package C_Pointer_Pointers is new Interfaces.C.Pointers (Index => Interfaces.C.size_t, Element => xcb.xcb_glx_get_color_table_reply_t.Pointer, Element_Array => xcb.xcb_glx_get_color_table_reply_t.Pointer_Array, Default_Terminator => null); subtype Pointer_Pointer is C_Pointer_Pointers.Pointer; end xcb.xcb_glx_get_color_table_reply_t;